1. Andres Slachevsky
  2. PowerBuilder
  3. Thursday, 27 July 2023 12:13 PM UTC

Hello All

I have this call to a windows API in kernel32.dll

 

FUNCTION ulong CreatePipe(ref ulong phReadPipe,ref ulong phWritePipe, ref s_security_attributes lpPipeAttributes,ulong nSize) LIBRARY "kernel32.dll" 

 

it works in32 bits 

but when it is compiled in a 64 bits exe it fails

i am attaching the PBL i am using to test

it runs a ping and dysplay the output in the MLE

 

i have made this change allredy

//Function Boolean CreateProcess ( String lpApplicationName, String lpCommandLine, &
// LongLong lpProcessAttributes,LongLong lpThreadAttributes, Boolean bInheritHandles, &
// LongLong dwCreationFlags,LongLong lpEnvironment, String lpCurrentDirectory, &
// s_startup_info lpStartupInfo, Ref s_process_info lpProcessInformation &
// ) Library "kernel32.dll" alias for "CreateProcessA;Ansi"

for 


FUNCTION Boolean CreateProcess (String lpApplicationName, String lpCommandLine, longlong lpProcessAttributes, longlong lpThreadAttributes, Boolean bInheritHandles, longlong dwCreationFlags, longlong lpEnvironment, String lpCurrentDirectory, ref s_startup_info lpStartupInfo, ref s_process_info lpProcessInformation ) Library "KERNEL32.dll" Alias For "CreateProcessW"

 

thanks all

Attachments (1)
René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 27 July 2023 12:29 PM UTC
  2. PowerBuilder
  3. # 1

Try to use type longptr for phReadPipe and phWritePipe and also for "security descriptor" in structure s_security_attributes.

Comment
  1. René Ullrich
  2. Thursday, 27 July 2023 12:34 PM UTC
  1. Helpful 3
  1. Andres Slachevsky
  2. Friday, 28 July 2023 12:13 PM UTC
Thansk rene

the sample in topwiz have all the changes i must do in my code

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.