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
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