Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 8th, 2004, 04:17 PM
Alcatīz Alcatīz is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Ličge (Belgium)
Posts: 2 Alcatīz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Calling CreateFile in a 16-bit program

Hi all !

I hope I've chosen the right forum - please excuse me if not.

I'm trying to call the CreateFile function of kernel32.dll from a 16-bit program (written in BPW 7.0), using the thunk functions of the 16-bit kernel (LoadLibraryEx32W, FreeLibrary32W, GetProcAddress32W, GetVDMPointer32W and CallProc32W).

Under Windows NT 4.0 (SP6) and Windows 2000 Pro (SP4) I get an access violation error in NTDLL.DLL.

I've verified all the parameters and I've converted all 16:16 pointers to linear addresses : it still doesn't work.
It's the first time I get an error with the thunk functions.

Could someone explain me what's wrong ?

Reply With Quote
  #2  
Old June 22nd, 2004, 01:46 PM
Alcatīz Alcatīz is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Ličge (Belgium)
Posts: 2 Alcatīz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Finally it works !

Instead of letting the CallProc32W translate the 16:16 addresses into linear ones, I use the GetVDMPointer32W directly.
I don't understand why it works but... I enjoy it because this problem has haunted me for 2 months !

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Calling CreateFile in a 16-bit program


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT