D. Choquette's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Again - C++ DirectX Error
Hi, i moved back to the C++ due to .Net memory management( slow down my app), anyway.... i recompiled the DirectX's C++ examples (October 2006 SDK) and when i run the examples a error ocurs, in the tutorials(No DXUtils) the error location is more evident: *this error code is from the Vertices tutorial. The Error: Unhandled exception at 0x6604a92f in Vertices.exe: 0xC0000005: Access violation reading location 0x00f2b000. The Location: LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) { switch( msg ) { case WM_DESTROY: Cleanup(); PostQuitMessage( 0 ); return 0; } return DefWindowProc( hWnd, msg, wParam, lParam ); The error appears at the end of this function . (green arrow in debugger....) -> ...Show All
Visual Basic updating data grid connect to ms access database.
I have a ms access database with a table consisting of the fields user_id and password. i have a datagrid binded with this information that is displayed in a vbform. i have added an "add" button. when i press this i want the new data entered in the datagrid to be updated in the msaccess database as well as the datagrid. so far i have the following code: Dim connStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source = C:\Documents and Settings\Owner\My Documents\Telephone.mdb" Dim con As New OleDb.OleDbConnection(connStr) con.Open() Dim objcommand2 As SqlCommand = New SqlCommand objcommand2.CommandText = "INSERT INTO Users" & _ "(User_ID, ...Show All
.NET Development WSE 2 x509 Certificates
Ive got a scenario where multiple clients ( each with a different certificate) accesses our service. When returning a signed and encrypted response from the service i need to sign it with the client public key. As there could be numerous keys i dont want to hard code a certificate in the policy file. Is there any way to automatically pick up the x509 token from the request to use in signing the response. I can do this in code but need to be able to do it within a policy file. ...Show All
Visual C# simple string compare not so simple
I am doing jsut a simple little string compare and the values are equal, however, I cannot get them to see that they are equal. Unless I am so Dyslexic I cannot read two simple strings. Here is the code: public bool test_ArPermHasPermission(string prefix, string action) { string permission = prefix + action; bool test = false; foreach (string p in arPerm) { //the values that fail: p = auth_update and permission = auth_update if (String.Equals(p.ToString(), permission.ToString())) { return true; } } return false; } I got so fed up with the string.equals I also tried the following: (p.ToString() == permission.ToString()); (p == permission.ToString()); (p.ToString() == permission); ...Show All
Visual Studio Express Editions Yahoo messenger API in Visual C++ 2005 Express
Will yahoo messenger api work with Visual C++ 2005 Express. And where do i put the API files to link and build my C++ application....I'm asking because i want to put animation characters in the background Please, please, take my advice. Go to a forum that discusses Yahoo APIs if you want help with them. I refuse to even use Yahoo, I certainly don't have their SDK on my hard drive. Others here *may* use it, but if you want to talk to a group of people who can all help with this question, then a place that discusses the Yahoo APIs is the way to go. ...Show All
Visual Studio 2008 (Pre-release) NLB with netTcpBinding
I have a WCF Service using netTcpBinding hosted over a Windows Service. Is it possible to use an NLB Load Balancer to distribute the network load across multiple servers, while using netTcpBinding Any pointers to this will be very helpful. Kishore Yes it is possible. Please check out this post by Kenny - http://kennyw.com/indigo/134 HTH Kavita ...Show All
Visual C++ read last character of a string
I need to read the last character of a String and if its not a backslash "\", i need to put a backslash there. Can anybody clue me in on an easy way to do it Thanks!! Are you using MFC there are alot of string alternatives like std::string char buffer and CString of MFC if CString CString strText; if( strText::Right( 1 ) != "\") { int nLength = strText.GetLength(); if( nLength > 0 ) { strText.SetAt(nLength-1,”\” } } Same login you can apply for char buffer by replacing GetLength with strlen funtion ...Show All
.NET Development Strange problem with the garbage-collector
Hi there, I have the following (somewhat strange) problem: I have developed a "business-object" that encapsulates all data and code of a specific part of my application. The process of building this object includes creation of a System.Data.DataSet and a Windows Form. Because processing all of the data is a very lengthy process, I have designed the class to process the data asychchronous to the main GUI-Thread. Creating the DataSet and the Windows Form is performed by a Pool-Thread. And this is the point, where my problems arise... Some time after the Pool-Thread has terminated I tried to display the Windows Form (created by the Pool-Thread). The result was: The Show()-Method of the Windows.Forms-Class raised ...Show All
.NET Development 32-bit application will not run on 64-bit machine
I have written a 32-bit application with the target platform type as "Any CPU". The application includes a setup package. When I attempt to install it on a 64-bit machine the setup fails. I thought that a 23-bit application was supposed to run as a 32-bit applicatoin on a 64-bit machine What do I do now When I attempt to compile the application to target the x64 platform only I get the following error: File 'Program.exe' of project output 'Primary output from Program(Active)' targeting AMD64 is not compatible with the project's target platform 'x86' which doesn't make any sense considering i set the target platform to x64... I have no idea what's going on. I noticed somewhere that you may have to recompile the solution to ...Show All
Visual Studio Team System Is it a good method to realize some functions by using the sourcecode?
Hi all: now I want to realise some hard functions that can't be realized only by using IL. so I want to know is it a good method to realize these functions by using the source code Now I can get the File path in the intructions of the method like these. Document dc = objmethod.Instructions[1].SourceContext.Document; SourceContext sc = objmethod.Instructions[1].SourceContext; SourceContext sc2 = objmethod.Instructions[objmethod.Instructions.Length - 1].SourceContext; if (dc != null) { // 取 string strPatheName = dc.Name; } So basically you are trying to get the name of the file that contains a certain method and the min and max line numbers of tha ...Show All
Smart Device Development Capture devices initialisation and status before each use.
Hi, is there any way to capture device status to see for example if sound card and the mic are fine You can check for available devices by calling waveInGetNumDevs() and waveInGetDevCaps(). However, there’s no good way for you to check if there’s a microphone attached, which device/input it’s attached to and if it’s working or not. At best you can ask user to say something and see if there’s signal produced. That's how setup works on pretty much all speech recognition and VoIP applications I've seen - setup shows list if devices/inputs and user chooses one and tests volume levels as needed. ...Show All
Software Development for Windows Vista State Machine - Resume Workflow with newer version of the workflow library
Hi all, Is it possible to have a persisted workflow instance resume on a newer version of the workflow webservice I've got a StateMachine workflow published as a web service and it works fine, but if you make any changes to the workflow and publish the webservice, it cant resume the workflow (IndexOutOfRange Exception). Is there something I'm doing wrong or is there a workaround / fix Thanks If you want to continue to you a previous version of a workflow after making changes you need to increment the version number. You can't make changes and automatically update already running instances. To change those to have the new logic you can use dynamic update, sample can be found here . ...Show All
Software Development for Windows Vista .NET IMAPI2 Code samples
Is anyone using SampleApp3 successfully After installing the Vista SDK Beta2 and trying to build this with Visual Studio 2005, I get: ------ Rebuild All started: Project: Demo3, Configuration: Debug Any CPU ------ C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets : warning MSB3287: Cannot load type library for reference "IMAPI2". Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets : warning MSB3287: Cannot load type library for reference "IMAPI2FS". Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfi ...Show All
SQL Server Programmatic generation of History snapshots with varying parameters
When you call CreateReportHistorySnapshot it generates a snapshot of the specified report with only the default parameter values. How would I generate snapshots based on parameters specified at runtime I think you would be better off using a LinkedReport. This is what they are for. So you can use the basic report yet different parms, Security, folder etc... But your way will work to you just have to write a bunch of code to make sure you put it back. Assuming that is necessary. Dave ...Show All
.NET Development CreateSubKey and SetValue raise no error but fail
After a login dialog, this executes ... ... using System.Security; using System.Security.Permissions; using System.Security.Policy; ... [assembly: RegistryPermissionAttribute( SecurityAction.RequestMinimum, ViewAndModify = "HKEY_CURRENT_USER" )] [assembly: KeyContainerPermissionAttribute( SecurityAction.RequestRefuse,Flags = KeyContainerPermissionFlags.Import )] // snips ... RegistryKey rkSW, rkCMP; try { rkSW = Registry.CurrentUser.OpenSubKey( "Software", true ); rkCMP = rkSW.CreateSubKey( "aCompanyName" ); using ( RegistryKey rkConn = rkCMP.CreateSubKey( "mssql_connect" ) ) { rkConn.SetValue( textBoxServer.Text + "_" + textBoxUser.Text, sConn ); } } catch( Exception ex ) { MessageBox.S ...Show All
