RavirajDanasekaran's Q&A profile
.NET Development ReadByte eating resources in 2005
Hello all In some parts of my code, i use Marshal.ReadByte and .WriteByte quite a lot. (And Write/ReadInt16, -32, -64). However, in .NET2005 they are up to 100 times as slow as in .NET2003. Here's the code i use for testing: Dim ptr As System.IntPtr = Marshal.AllocHGlobal(50001) Dim Key_nr As Short = 0 Dim loc_cnt As Integer start = Now For loc_cnt = 1 To 50000 Marshal.WriteByte(ptr, loc_cnt, CByte (loc_cnt Mod 200)) Next finish = Now Me .TextBox_WriteByte.Text = (finish.Subtract(start)).TotalMilliseconds.ToString Marshal.FreeHGlobal(ptr) And i really do need to use these functions... Even more surprising is the performance difference in the RtlMoveMemory: Private Declare Sub Cop ...Show All
SharePoint Products and Technologies Sites or Portals
I am currently investigating the rollout of Sharepoint 2007 to teaching staff and students but are currently unsure at this stage what's the best and most effective way to deploy this. Each of the teaching areas is split into directorate and then into departments, like so; Institute of Tourism and Sport (Institute) Tourism (Dept) Hospitality (Dept) Sports Studies (Dept) Would it be better to structure the deployment so that each Institute is a portal and the departments is a site, or create a single portal, create the Institute as category groups and create the departments as sites What are the pro's/con's of each take a look at the Plan sites and features section the Planning a ...Show All
Visual C# c# and fortran
Hi, I'm trying to use Fortran routines in c#, for that, I think, I need to create a dll from the fortran source, and then import and declare the routine in the c# code. This is what I'm doing: Fotran code: SUBROUTINE KEPLER (S) IMPLICIT NONE !DEC$ ATTRIBUTES DLLEXPORT :: KEPLER !DEC$ ATTRIBUTES C, REFERENCE, ALIAS:'KEPLER_' :: KEPLER INTEGER I1,I2,K CHARACTER*1 S Command line for dll generation: gfortran -c kepler.f gfortran -shared -o KEPLER.dll This is how the dll is imported: [ DllImport ( @"KEPLER.dll" , EntryPoint = "KEPLER" )] public static extern void KEPLER( string output); when I run my application, where I call the KEPLER(S) routi ...Show All
Visual Studio Express Editions Show Data Source item
When I try to open the Show Data Sources window from the the data menu, I get an error that says "Operation Failed Only True type fonts are supported. This is not a true type font." I've tried changing all the fonts in the options-environment-fonts and colours area to Times New Roman and restarting but the error persists. Any ideas Robert (in Brisbane) I've tried the first two steps withno success. Resetting to the defaults sets all the fonts to Courier New , which isn't a true type font. I haven't done a full re-installation yet. I'll report on that when I've done so. Robert F ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XML TOOL KIT HELP
hey there was wondering if any one is able to give me a few pointers on XNA. trying to create a toolkit using xna that will allow me to design levels, but also want to export the created level to an xml file and also reloaded it into my main game engine from the the xml file, any pointers cheers, thanks for there help Shawn Hargreaves - MSFT wrote: Be aware that there is no BinaryFormatter on Xbox: that's not included by the Compact Framework. Thanks for the heads up. How about the XmlSerializer If so, then just do: XmlSerializer serializer = new XmlSerializer( typeof (Level)); Stream writer = new FileStream (filename, FileMode .Create); serializer.Serialize(writer, this); writer.Close(); ...Show All
SQL Server How to create Vertical Partioning
Hi All, I setup a Transactional replication between SQL Server 2000 and SQL Server 2005 via wide area network . The intial snapshoot failed because run into problems on a table with column 379 columns. How do ceate Vertical Partioning a table on Publication Thank you. TJ_1 You can take a look at How to: Define and Modify a Column Filter (Replication Transact-SQL Programming) http://msdn2.microsoft.com/en-us/library/ms146925.aspx Gary ...Show All
Windows Forms Dual Display Issues Using Vista
I’ve been using multiple monitors for years on this system, trouble free, using the XP OS. When starting up (or returning from screen saver) using the Vista OS, the display configuration randomly changes. It's a surprise almost every time Vista starts. Occasionally the previous settings are retained like they should be. Any ideas best place would be over at the communities in the appropriate newsgroup: www.microsoft.com/communities also remember - Vista is still in beta and not completed yet so you will face some problems currently until the released version. Thanks! ...Show All
Visual C++ Calling convention clash, help!
cause i can't call SHGetFolderPathA directly in WIN98, so my program need to link dll dynamically. This is my code: SHFOLDERAPI SHGetFolderPathA(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPSTR pszPath); typedef HRESULT (*MYPROC)(HWND,int,HANDLE,DWORD,LPTSTR); MYPROC g_pfnSHGetFolderPath; HMODULE hModSFolder = LoadLibrary("shfolder.dll"); if ( hModSHFolder != NULL ) { (g_pfnSHGetFolderPath = (MYPROC)GetProcAddress(hModSHFolder,"SHGetFolderPathA")); } else { g_pfnSHGetFolderPath = NULL; AfxMessageBox("can't load shfolder.dll"); return 1; } if((g_pfnSHGetFolderPath)(NULL,CSIDL_PROGRAM_FILES,NULL,SHGFP_TYPE_CURRENT,Buffer)==E_FAIL) { AfxMessageBox("Can't Find Program File folder. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. SpriteCache - A custom sprite renderer to eventually replace SpriteBatch. Source & Demo inside.
Hey all, I put together SpriteCache for people interested in rolling their own SpriteBatch class. It's capable of doing almost anything SpriteBatch can do (no rotations yet), but also adds two nifty things: Per-Sprite Shaders - I know this is possible with SpriteBatch, but it's pretty obnoxious to have to set it up every time. With SpriteCache, you just set the effect and draw as normal. It's a lot simpler then setting up the effect passes every time. Four-Corner Tinting - I don't know why you can't do this with SpriteBatch, but you can't. SpriteCache allows you to tint each corner of your sprite individually. This is cheapest way to do 2D lighting. Play with the source and the demo and let me know what you think, I'd appreciat ...Show All
Visual FoxPro table question
Hi, I don't know how to check if a fox table has a list of atributes or fields in a specfied order. For example, I have a table employee and I want to know if it has the fields id_employee, employee_name and employee_hiredate in this order. This verification will be included in a fox program. Does someone know how to solve this Thanks, >>I don't know how to check if a fox table has a list of atributes or fields in a specfied order. Well, the easiest way is to do it in two stages. First see if the fields are there at all - use FCOUNT() and FIELD() for this: lnFound = 0 FOR lnCnt = 1 TO FCOUNT() lcField = FIELD( lnCnt ) IF INLIST( ALLTRIM( LOWER( lcField )) , ''id_employee& ...Show All
Visual Studio Tools for Office add-in write text in excel
Hi Experts i am trying to write text on excel sheet ,i am using the following code: appXl.ActiveCell.Value2 = "Sample Text " ; this is working fine when a cell is selected but its not working when the cell in edit mode. If the experts in the Excel programming group said it can't be done, it can't be done. The only possibility that occurred to me was to try SendKeys, but even that didn't work. Command execution is blocked. Excel can do it, for certain commands, because the developers that programmed it have access to that capability. They didn't choose to expose it in the object model. You could go back to the excel.programming web interface, create a new post, and ma ...Show All
Audio and Video Development Extending Classes in HDi - not working in Emulator
We're seeing some weird behavior on the Toshiba Emulator. Object oriented javascript runs well in HDi - you can have multiple extensions of a class and they act as expected. However when this script was run in the Emulator all extended classes act like the very last class loaded. So for example if a Food class is extended to veggie, fruit and grain; in they Emulator they all act like the grain class (assuming it was the last one loaded). Am I missing something in the ECMA spec that prohibits object oriented javascript I know it's just an example, but that's just a lot of overhead just to do this: function base() {}; base.prototype.initialize = function base_init() { print("base init"); }; base.prototype.getClassName ...Show All
Visual Basic Not able to include reference to Microsoft Excel 11.0 Object Library
I am having problem in adding the reference of Excel com in to a Visual studio 2005 project. I can select the Microsoft Excel 11.0 Object Library in the add reference window, but the same is not added to the project reference. What is the deal I need help. I checked the C:\Windows\assembly for the assembly and it is there as Microsoft.Office.Interop.Excel. Thanks. Works fine for me.... You can ensure install the Office Primary Interop Assemblies and see if that helps. http://msdn2.microsoft.com/en-us/library/aa159923(office.11).aspx ...Show All
Visual Basic Trying to create an add in for excel through VS2003 and I am missing something
I created an add in through VS2003 development environment but I cant use the funtion from excel. I originally created the functions using VBA but now i want to program everything from VB. I followed the direction in the help files about creating an addin for office programs but it isnt working. Can some one some me the light My addin isn't showing up in the addin manager for excel. Is this required Thanks you for your assistence. ...Show All
SQL Server MS Sql Server Management Studio SP2
I am experiencing a problem with functions when pulling from a sql2000 database that I found information indicating that it was fixed with SP2. I'm trying to find a Service Pack 2 specific to SQL Server Management Studio and am having some difficulty. I found service pack 2 for sql 2005 but nothing specific to Management Studio. Does anyone know what I should be looking for specifically or where I might find sp2 for management studio I think you are mixing some things up. SQL Server 2000 has SP4 which fixes problems around the service and some client issues. The administrative console for SQL Server 2000 is Enterprise Manager not SSMS. Actually right now there is no SP2 available for SQL Server 2005. You s ...Show All
