` Passing null terminated arrays to PathFindOnPath (John E. Christ III) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Windows API: Passing null terminated arrays to PathFindOnPath
2003-08-31 -- John E. Christ III
 
Newsgroups: softvelocity.products.c55ee One more time... A line that wasn't supposed to be there (PathPtr[1] = 0) somehow crept in. Maarten, > > >How do I define a null-terminated array (ppsz) for an API call? For the non-UNICODE version MODULE('Win32.lib') PathFindOnPath(*CSTRING, LONG), LONG, RAW, PASCAL, DLL,| NAME('PathFindOnPathA') END Data: Filename CSTRING(256) Paths CSTRING(256), DIM(100) PathPtr LONG, DIM(100) Code: Filename = 'MyApp.app' Paths[1] = 'c:\MyDir1' PathPtr[1] = ADDRESS(Paths[1]) Paths[2] = 'c:\MyDir2' PathPtr[2] = ADDRESS(Paths[2]) PathPtr[3] = 0 ! Null terminate the array of pointers X# = PathFindOnPath(Filename, ADDRESS(PathPtr)) IF X# MESSAGE('Found it!') ELSE MESSAGE('Didn''t find it!') END John


Today is April 25, 2024, 4:37 pm
This article has been viewed 35111 times.
Google search has resulted in 151 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: