Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WOWGlobalLock16 Bombs In NT but Works In Win98

Status
Not open for further replies.

SWilliams15

Programmer
Dec 28, 2000
14
US
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);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top