Code Comments
Programming Forum and web based access to our favorite programming groups.Net Express Cobol and WINAPI Hello! I use Net Express Cobol 4. I have already made some mf net expr. cobol programs using WINAPI that work, but I have problems with the following piece of code: IDENTIFICATION DIVISION. PROGRAM-ID. cobolwinapi. ENVIRONMENT DIVISION. SPECIAL-NAMES. call-convention 74 is WINAPI. DATA DIVISION. WORKING-STORAGE SECTION. 01 uint is typedef pic 9(SZ) comp-5. 01 ulong is typedef pic 9(9) comp-5. 01 DWORD is typedef ulong. 01 wdirname pic x(256). 01 wdirptr pointer. 01 wsize uint. 01 wret dword. PROCEDURE DIVISION. Main-Process SECTION. call "cob32api". *> for int and gnt progs move spaces to wdirname move 256 to wsize set wdirptr to address of wdirname call "GetCurrentDirectoryA" using by value wsize by reference wdirptr returning wret. After the call the value of wret is correct - 4 (for "N:\i"), but there is no value in wdirname. Does anybody know a solution for this? Thanks in advance Wolfgang
Post Follow-up to this messagewolfgang.adamec@gmail.com wrote: > Net Express Cobol and WINAPI Wolfgang, I don't do APIs. Possibly one of the M/F lurkers will jump in and give you an answer, or somebody else who is familiar with API calls. Are you aware that going to microfocus.com you can sign-up for free and register questions, under the heading 'Net Express' on the M/F Forum ? Jimmy
Post Follow-up to this messageHi, You need to use the alias of the calling convention, case in point: call WINAPI "GetCurrentDirectoryA" using by value wSize size 4 by reference wDirPtr returning wRet end-call http://msdn.microsoft.com/library/d...ntdirectory.asp Kellie.
Post Follow-up to this messageHello Jimmy! Thank you for your advice. Wolfgang
Post Follow-up to this messageplease use either by value wdirptr or by reference wdirname
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.