xshua's Q&A profile
Visual C# There is no row at position 447: Cannot fill in a DataTable
I have a DataTable which is filled with rows from a data stream. I Add a row each time a new complete set of field values becomes available. There are 6 fields in rows: three float, one int, one DateTime and one string (rather short, about 4 bytes). After I streamlined my code to eliminate massive losses of data now the process is working fast. All of a sudden I get an error message: There is no row at position 468. I put a Console.WriteLine statement in the routine which handles filling the rows (individually, one by one). Row 469 was created and then the message appeared. In fact when I repeat the runs it breaks down at slighly different rows at each run. Also I have a button which I press. It creates a socket, send a request ...Show All
Software Development for Windows Vista Infocard problem on Windows Vista
Apparently, after joining a domain, the InfoCard UI stops working and RPC errors are reported. This is on Windows Vista beta 2, 64bit version (I didn't try the 32 bit version). Before joining a domain, InfoCard did work correctly. That's on a fresh install of Windows Vista beta 2. I had same issue on two different machines, each time with a fresh install of Vista beta 2. As soon as the June CTP of Windows Vista is available on MSDN I'll try it again. ...Show All
Visual Basic Excel Functions within VB
Hey, I'm using the PMT function in excel and in VB 2005. Basically what I'm doing is trying to make my loan calculator an actual program, instead of always having to write everything out within an excel spreadsheet. I have all the needed information and I thought that my VB code was correct, and according to all the help files I can find they are. However the number I get from the function in my VB program is wrong. I'm not sure why the answer is different if all the inputs are the same in both the program and the spreadsheet. Thanks for the insight. Here's my code for the PMT Function in my program, incase you need to see it: MonthlyLoanPayment = -Pmt((InterestRate / 12), Math.Round(MonthsWithoutMedicaid), LoanedAmount) Azrael ...Show All
Visual C# Disabling Text boxes
Hi I have 50 Text boxes on a panel. The names for these Text Boxes will be of like T1,T2,T3...T50. Now I have a number which comes dynamically in to the code. Based on this number for Ex: 12, all the Text boxes after T12 should be disabled.Now i was not able to match the pattern of name of the Textboxes on the panel with the number.Any code snippets to do this are much appreciated. Like if (obtained_no like '%Textboxname%') { Then for(temp = obtained_no+1; temp <51; temp++) { disable(Texboxes_temp) } } Thanks! If I needed 50 textboxes on a form, I would probably not make them in the designer. Instead, I would have a panel (say textBoxPanel), and do something like this with a control array (not tes ...Show All
Visual Studio MSDN May 2006 - How to share
Hi, How can I share this version with other members of my team In the past, members mount a shared DVD and select the "minimal install" (minimum install on local disk, content on DVD); simple and efficient. With this new version, this useful and efficient option has been removed (why ), is there a way to accomplish this without having each member install the whole MSDN library to their local hard disk WD. Thank you very much for much for posting your question. Due to changes in Help in Whidbey, Run from Source is no longer available, however I believe an option is listed in the Setup.chm file that allows you to run from a shared network folder where you have copied the files from the MSDN DV ...Show All
Smart Device Development How do I capture "panel" scroll event?
I want to do some drawing bigger than the PocketPC Screen. I need to be able to capture the panel scroll event to draw the picture correctly base on the scroll bar position. Thanks in advance. .NETCF doesn't expose the scroll event on scrollable controls. Since you are planning on painting your panel's client area, just hook the OnPaint event. When deciding what part of your picture to draw, look at the AutoScrollPosition property to see what offset to use. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. waiting for a sound to finish
Hi, I'm all new to this & there is probably a simple solution.. I'm wanting to play a sound and trigger an event or callback when that sound has finished playing. Do I need to check the status of the sound in each Update or is there a more elegant way Many thanks, Pat XACT supports notifications for this. Check out the IXACTEngine::RegisterNotification method and the associated XACT_NOTIFICATION_DESCRIPTION structure. (Note that this functionality is not available in XNA). ...Show All
.NET Development How to setup a Kerberos delegation? (.Net 2.0)
Hello, I am trying to configure the kerberos delegation. On the client side the AuthenticationType is set to Kerberos but on the server side it is changed to NTLM. Client registeration: IDictionary channelProps = new Hashtable (); channelProps.Add( "secure" , true ); channelProps.Add( "tokenImpersonationLevel" , System.Security.Principal. TokenImpersonationLevel .Delegation); BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider (); serverProv.TypeFilterLevel = System.Runtime.Serialization.Formatters. TypeFilterLevel .Full; BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider (); TcpChannel channel = new TcpChannel (channelProps ...Show All
.NET Development line ending problem
Hi, I get data from an oracle database (8i) by filling a dataset. <ds.fill>. When I check the data in Oracle, the lines ends with "0D 0A"(CR/LF). When I check the data received in the dataset, the lines ends with "0D" (CR). This might be the cause of a problem I'am having right now. Does anybody know about why it appens and what can I do to keep "0D 0A" Thanks, Sylvain How did you get the result into Ultra Edit-32 I.e. how did you get it from the .NET string If you are outputting it to a file and then viewing the file, we don't know if the character is getting truncated during the file write, or if it's incorrect in the DataSet/DataReader itself. In your original post, you m ...Show All
Visual C++ _AFX_NO_OLE_SUPPORT
I'm working in VS2005 I have created the MFC extention dll, and specified _AFX_NO_OLE_SUPPORT because i don't need the OLE support. It gives me the error c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxdllx.h(57) : error C2039: 'm_pFactoryInit' : is not a member of 'AFX_MODULE_STATE' c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxstat_.h(206) : see declaration of 'AFX_MODULE_STATE' And this is true, in the AFX_MODULE_STATE is declared : class AFX_MODULE_STATE : public CNoTrackObject { public: ... #ifndef _AFX_NO_OLE_SUPPORT #ifdef _AFXDLL COleObjectFactory* m_pFactoryInit; #endif CTypedSimpleList<COleObjectFactory*> m_factoryList; #endif ... } But in the afxdllx.h: BOOL WINAPI ExtRawDllMain( ...Show All
Smart Device Development Difference between .NETCF 1 WinForms and .NETCF 2.0 WinForms.
Hi, I need the difference between .NETCF 1 WinForms and .NETCF 2.0 WinForms. Can any one help me out. Thanks in advance. I’m not sure what exactly you mean by “difference”, but you can compare OM here: http://compactframework2.net/compare/ ...Show All
Visual Basic C++ static library reference in vb.net
I am using vs2005 I like to use a MIDI C++ library that is compiled as a "static library" with a .lib file extention and a lot of .obj files. How can I reference this library It seems to me that only DLL's are allowed to be used. I have the source code of the C++ but I don't know how to make it a DLL. When I try to just change the property and compile it, I get the following error: Error 37 error LNK2019: unresolved external symbol __imp__timeEndPeriod@4 referenced in function "public: void __thiscall jdkmidi::MIDIDriverWin32::StopTimer(void)" ( StopTimer@MIDIDriverWin32@jdkmidi@@QAEXXZ ) jdkmidi_driverwin32.obj Any ideas You can't use a .lib, you have to create a DLL ...Show All
.NET Development Is it possible to enumerate a USB device ......
hello.., I am doing a USB project in windows XP, in which i need to eject the any USB mass storage device which is plugged-in , for this i am using CM_Request_Device_Eject(). And it is working well. But when more than one device is plugged-in to the system, sometimes, there are cases that more than one device is getting the same deviceInstance, basing on which i am ejecting the device. Due to this the CM_Request_Device_Eject() is either ejecting the recently plugged-in device or ejecting the already ejected device by returning S_OK. To avoid this mismatch of the DeviceInstances, i want to enumerate the plugged-in devices for every minute. But when i do this, GetLastError() is returning NO_MORE_ITEMS. So, my doubt is.. Is this possible to ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Post-Processing glow shader
I'm trying to get the Glow shader technique discussed in a Gamasutra article (http://www.gamasutra.com/features/20040526/james_pfv.htm) implemented in my XNA project but am struggling with certain aspects of it. The blur of the scene takes place in two separate passes, one for each axis. So when you do the horizontal blur pass, you pass it your scene which you've rendered to a RenderTarget2D. Then for the vertical blur pass which follows, you have to pass it the resulting texture from the previous pass. This is where I don't really understand anymore... what is the proper way to set this up so that you can extract the results of the first pass and give it to the second pass when you already have an Effect activated ...Show All
Visual Studio Team System Programmatical Get Latest not working from service
Hi all, I'm trying to make a custom build task that will perform a get latest from TFSVC and then run the SQL scripts in a particular folder against a database. This all seems to be working fine, however, I made a change to one of the scripts and then kicked off the build, and the get latest did not pull back the latest version of the file. I tried stepping through the code on the build server and this time it did get the latest version! This is the code I'm using for the get latest: Dim tfs As New TeamFoundationServer(_strTeamFoundationServer) Dim vc As VersionControlServer = CType (tfs.GetService( GetType (VersionControlServer)), VersionControlServer) Dim objWorkSpace As Workspace = vc.GetWorkspace(_strSourceControlF ...Show All
