|
| File descriptor in WinDev |
| Iniciado por guest, 03,jul. 2015 07:31 - 1 respuesta |
| |
| | | |
|
| |
| Publicado el 03,julio 2015 - 07:31 |
Hi all,
I want to pass an file descriptor to an external library. Below is what I tried:
temp is int = fOpen("DebugTrace.txt", foAdd)
In C fOpen returns file descriptor, whereas here I am getting File ID which will be like 2/3 etc..
I want to do below API call:
API("extrenal.dll","API_NAME",file_descriptor)
Any suggestions?
Thanks and Regards, Naveen Rathan |
| |
| |
| | | |
|
| | |
| |
| Publicado el 08,julio 2015 - 12:38 |
Hi Naveen,
Here is the code: FileName is string ASCIIZ on 256 //Check length of string in API documentation FileHandle is int FileName = "C:\\Directory\\FileName.txt" //In C you normally need to escape the \ character by adding another \ to it. Check your API documentation if this is required. APIResult = API("External.DLL","FunctionName",&FileName) //In C you need to pass the memory address to the string. You do this by prefixing the variable with the & character. Cheers,
Peter H. |
| |
| |
| | | |
|
| | | | |
| | |
|