SWilliams15
Programmer
I have a 32bit ocx component that communicates with a 16 bit app using DDE. I call the ocx component from a VB6 app. Under Win98, the offending line of code below works but under winNT it does not. I get an error message in VB when running in NT saying that the method (GetData) failed in the ocx. I've tracked the offending line of code to the one below that has the comments saying "// This is the line that causes the ocx to bomb in NT". Actually, all the references to to WOWGlobalLock16 cause NT to bomb but work in 98.
Can someone perhaps give me a reason why this is happening or at least a resource that might provide a clue to the answer.
Thank You,
Sean.
BARINFO *Info = (BARINFO *)DdeAccessData(Data, &Len);
// ******
DWORD Temp1 = WOWGlobalLock16((WORD)Info-
>hSymRec); // This is the line that causes the ocx to bomb in NT
// and now it continues...
SYMREC1 *SymRec = (SYMREC1 *)WOWGetVDMPointerFix(Temp1, sizeof(Temp1), TRUE); // and if you rem the first line out, it bombs on this one
DWORD Temp2=WOWGlobalLock16((WORD)Info->hTime);
SYMTIME *Time = (SYMTIME *)WOWGetVDMPointerFix(Temp2, sizeof(Temp2), TRUE);
Can someone perhaps give me a reason why this is happening or at least a resource that might provide a clue to the answer.
Thank You,
Sean.
BARINFO *Info = (BARINFO *)DdeAccessData(Data, &Len);
// ******
DWORD Temp1 = WOWGlobalLock16((WORD)Info-
>hSymRec); // This is the line that causes the ocx to bomb in NT
// and now it continues...
SYMREC1 *SymRec = (SYMREC1 *)WOWGetVDMPointerFix(Temp1, sizeof(Temp1), TRUE); // and if you rem the first line out, it bombs on this one
DWORD Temp2=WOWGlobalLock16((WORD)Info->hTime);
SYMTIME *Time = (SYMTIME *)WOWGetVDMPointerFix(Temp2, sizeof(Temp2), TRUE);