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; // -54
}else if(hResult == WFS_ERR_INTERNAL_ERROR)
{
cout << WFS_ERR_INTERNAL_ERROR << endl; // -15
}else if(hResult == WFS_ERR_INVALID_APP_HANDLE)
{
cout << WFS_ERR_INVALID_APP_HANDLE << endl; // -17
}else if(hResult == WFS_ERR_INVALID_POINTER)
{
cout << WFS_ERR_INVALID_POINTER << endl; // This is the error I get which is -26
}
I get the (-26) which says "A pointer parameter does not point to accessible memory when you refer to the cen documentation.
Any one know which pointer is refered to by this error here?
Thanks