Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Using far pointers in Borland C++
Name: Sonia Date: December 2, 2002 at 05:43:31 Pacific OS: Win 2000 CPU/Ram: P4
Comment:
Hi! I've got this snippet of code that I'm using on a Borland C++ V5 compiler. But I get the error : E2141 Declaration syntax error. Help please! ******************************************** static unsigned char far *servicevec = MK_FP(ROMBIOSIDSEG, (ROMBIOSIDOFF + offsetof(rombiosid, jmp2PublicServices))) ; asm { mov bx,word ptr parmptr[0] mov cx,word ptr parmptr[2] call dword ptr [servicevec] cld } return (((((pfuncshdr far *)parmptr) -> errorCode) != E_PUBSRVCERRNONE) ? -1 : 0); ********************************************
Name: Jeff J Date: December 2, 2002 at 19:48:42 Pacific
Reply:
That's 16-bit C code and assembler, and you're using a 32-bit compiler. I you are just asking about the far pointer declarations, just delete the "far" words. With 32-bit pointers, near and far are not used. I cannot guarantee the rest will work, though.
0
Response Number 2
Name: Sonia Date: December 3, 2002 at 02:44:21 Pacific
Reply:
Thanks a lot for your help! I removed the "far" words but still get an error with this MK_FP macro. I know MK_FP builds a far pointer value from a segment and an offset. But now that I don't require to build this far pointer, how do I implement it directly??
This is what I get after compilation!
Warning: Call to function 'MK_FP' with no prototype in funciton pubservicecall
Warning: Nonportable pointer conversion in function pubservicecall
Turbo Incremental Link 5.00 blah blah Error: Unresolved external 'MK_FP' referenced from test.obj.
Summary: I want to make a small program in C language to whom when i run should Ping specific range of IP addresses on my LAN system.For example my range is from 192.168.0.41 to 192.168.0.59 so every time if ...
Summary: Hi, I wanna make a project in Borland C++ v5.02. I set these parameters: Target Type : application(exe) Platform : Win32 Target Model : GUI Framework : OWL While making the project i received this err...