Hi, I get "first-chance exception at 0x1000161f in myapp.exe: 0c0000005: Access violation reading location 0x00000000." If i execute the WFSOpen command. To be able to receive the error pointing to the correct error value I've done this: LPHSERVICE lphService; lphService = 0; // I put 0 because the EXIT_SUCCESS is also 0 HRESULT hResult; WFSVERSION SvcVersion, SpiVersion; char szLogicalName[]="Epson1200"; hResult = (WFSOpen(szLogicalName,WFS_DEFAULT_HAPP,"Epson Print",WFS_TRACE_NONE,TWO_MINUTES,RECOGNISED_VERSIONS,&SvcVersion,&SpiVersion,lphService)); if(hResult == WFS_ERR_CANCELED) { cout << WFS_ERR_CANCELED << endl; // This returns -4 }else if(hResult == WFS_ERR_SERVICE_NOT_FOUND) { cout << WFS_ERR_SERVICE_NOT_FOUND << endl; // This is -43 }else if(hResult == WFS_ERR_CONNECTION_LOST) { cout << WFS_ERR_CONNECTION_LOST << endl; …

Member Avatar
Member Avatar
+0 forum 11

I'm learning win32 programming from [Here](http://www.functionx.com/win32/Lesson03.htm) and I have problem in part of tutorial about string table it gives me this error: Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. Here is mycode: //--------------------------------------------------------------------------- #include <windows.h> #include "resource.h" //--------------------------------------------------------------------------- char AppCaption[40]; LRESULT CALLBACK WndProcedure(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); //--------------------------------------------------------------------------- INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MSG Msg; HWND hWnd; …

Member Avatar
Member Avatar
+0 forum 1

The End.