Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Queston on PCommServer Pro2
#1
I have run into a small problem using the Library. I am attempting to make a DLL using the MinGW compiler in C++ without .NET. I am basing this on the BCB5 example as it seems the most applicable to me (C++, no .NET). I am creating the handle to IPmacDevice this way:

Code:
IPmacDevice *g_idevice = NULL;
HRESULT result;

result = CoCreateInstance(CLSID_PmacDevice, NULL, CLSCTX_LOCAL_SERVER, IID_IPmacDevice, (void **)&g_idevice);

if(SUCCEEDED(result))
{
   g_idevice->AddRef();
}

I then open the device.

Code:
short itemp;
VARIANT_BOOL success;
long d = 0;

g_idevice->Open(d, &success);

Device 0 has already been setup using PEWINPRO2 so I do not need SelectDevice at this time. At this point this function succeeds and returns VARIANT_TRUE. The trouble comes when I run this function:

Code:
wchar_t *answer = new wchar_t[256];
wchar_t *question = new wchar_t[256];
long d = 0;
long g_lasterror;

swprintf(question,L"TYPE");

g_idevice->GetResponseEx(d,question,VARIANT_FALSE,&answer,&g_lasterror);

It is here that I get a crash and an "Unknown signal" message from my debugger. Have I missed anything in using the library at this point?
Reply
#2
Is the L supposed to be in L"TYPE"?

I am not familiar with that syntax, if so.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)