>This is what I've used for a long time:
>
>
DECLARE INTEGER GetSystemDirectory IN Win32API AS GetSysDir ;
> String @cBuffer, Integer nBufferSize
>
>pcBuffer = SPACE(199)
>=GetSysDir(@pcBuffer, 200)
>pcBuffer = ALLT(STRTRAN(pcBuffer, CHR(0), ""))
>IF .NOT.EMPT(pcBuffer)
> lcWinSysDir = pcBuffer
>ENDIF
>
>
>>I am trying to develop an application that will self-distribute itself and install the OCX and DLL files it needs but I don't know what syntax is or function to call to locate the System directory of the OS to copy these files to. I cannot use the Setup Wizard to generate the setup files or to install the OCX and DLL files. I need my application to do it. Can someone help me on this one?
Mark,
Couple of notes here.
First, you're working too hard. The function returns the number of characters copied to the buffer. So, if you capture that value, and it's greater than zero (which it should be), simply LEFT(pcbuffer, chars_returned) will get the information.
Second, the size of the buffer, according to the Platform SDK, should be at least the current value of MAX_PATH (260).
George
Ubi caritas et amor, deus ibi est