Greetings,
Is it possible to utilize a DLL file while running a GNT?
I have downloaded the 'checklogin' sample from MF and i'm trying to obtain the user login trough MFCOBOL.
I'm calling a checklogin.gnt instead of the executable, since the .exe cannot share it's results (unless i write to a file wich i'm trying not to).
However when calling the checklogin.gnt, apparently it cannot find the MPR.DLL wich it needs. 
I have %\\system32 on PATH (wich is where MPR.DLL is located).
Running Server 5.1 on Server 2003.
It returns the following error:
Function failed = 487
On winerror.cpy 487 = ERROR-INVALID-ADDRESS
An entry point within a .dll can be called from any of the code formats supported by Net Express including .int, .gnt, .exe or .dll.
When you are creating an .exe or .dll you have a choice as to how you wish to load the .dll, either dynamically or statically because you can link an import library to the .exe/.dll that will resolve the call at link time.
If you do not link in the import library, (which you cannot for .int or .gnt) then you need to dynamically load the .dll before you call its entry points.
You do this by setting a procedure pointer as follows:
01  MPR-pointer             procedure-pointer.
    set mpr-pointer to entry "MPR.DLL"    
You should then be able to call the entry points within this .dll.
Since the checklogin example program already does this set, i was able to change it from an .exe to a .gnt and reuild and run it without any other changes.
Have you tried to debug through this program to see on what line the error is occurring?
Thanks.
                
     
                                    
            Greetings,
Is it possible to utilize a DLL file while running a GNT?
I have downloaded the 'checklogin' sample from MF and i'm trying to obtain the user login trough MFCOBOL.
I'm calling a checklogin.gnt instead of the executable, since the .exe cannot share it's results (unless i write to a file wich i'm trying not to).
However when calling the checklogin.gnt, apparently it cannot find the MPR.DLL wich it needs. 
I have %\\system32 on PATH (wich is where MPR.DLL is located).
Running Server 5.1 on Server 2003.
It returns the following error:
Function failed = 487
On winerror.cpy 487 = ERROR-INVALID-ADDRESS
It seems the original code was altered.. a LINKAGE was included, and wasn't working. 
How do i go about passing the obtained user back to the calling program?
In the caller program (CT900) i have the following:
       01 ws-LINK.
           05  WS-ERRO                 PIC X(01).
           05  ws-username             pic x(50) value spaces.
CALL "CHECKLOGIN" RETURNING WS-LINK.
This however gives me the following error :
"Rebuilding         Z:\\fontes_cobol\\contab\\CT900.cob
COBCH0028S Data item too long "
and in CHECKLOGIN i altered PROCEDURE DIVISION RETURNING WS-LINK.
This compiled properly.
                
     
                                    
            Greetings,
Is it possible to utilize a DLL file while running a GNT?
I have downloaded the 'checklogin' sample from MF and i'm trying to obtain the user login trough MFCOBOL.
I'm calling a checklogin.gnt instead of the executable, since the .exe cannot share it's results (unless i write to a file wich i'm trying not to).
However when calling the checklogin.gnt, apparently it cannot find the MPR.DLL wich it needs. 
I have %\\system32 on PATH (wich is where MPR.DLL is located).
Running Server 5.1 on Server 2003.
It returns the following error:
Function failed = 487
On winerror.cpy 487 = ERROR-INVALID-ADDRESS
Nothing like checking old code.. one has to use 'USING' not 'RETURNING' . Sorry about that.
                
     
                                    
            Greetings,
Is it possible to utilize a DLL file while running a GNT?
I have downloaded the 'checklogin' sample from MF and i'm trying to obtain the user login trough MFCOBOL.
I'm calling a checklogin.gnt instead of the executable, since the .exe cannot share it's results (unless i write to a file wich i'm trying not to).
However when calling the checklogin.gnt, apparently it cannot find the MPR.DLL wich it needs. 
I have %\\system32 on PATH (wich is where MPR.DLL is located).
Running Server 5.1 on Server 2003.
It returns the following error:
Function failed = 487
On winerror.cpy 487 = ERROR-INVALID-ADDRESS
Nothing like checking old code.. one has to use 'USING' not 'RETURNING' . Sorry about that.
                
     
                                    
            Greetings,
Is it possible to utilize a DLL file while running a GNT?
I have downloaded the 'checklogin' sample from MF and i'm trying to obtain the user login trough MFCOBOL.
I'm calling a checklogin.gnt instead of the executable, since the .exe cannot share it's results (unless i write to a file wich i'm trying not to).
However when calling the checklogin.gnt, apparently it cannot find the MPR.DLL wich it needs. 
I have %\\system32 on PATH (wich is where MPR.DLL is located).
Running Server 5.1 on Server 2003.
It returns the following error:
Function failed = 487
On winerror.cpy 487 = ERROR-INVALID-ADDRESS
Nothing like checking old code.. one has to use 'USING' not 'RETURNING' . Sorry about that.