Re: GTK-Function with pathnamestring???

I would like to remind everyone that for Windows, this discussion is
moot.  From

The GetModuleFileName function retrieves the fully qualified path for
the specified module.

To specify the process that contains the module, use the
GetModuleFileNameEx function.

DWORD GetModuleFileName(
  HMODULE hModule,  LPTSTR lpFilename,  DWORD nSize);

        [in] Handle to the module whose path is being requested. If this
        parameter is NULL, GetModuleFileName retrieves the path of the
        executable file of the current process.
        [out] Pointer to a buffer that receives a null-terminated string
        that specifies the fully-qualified path of the module. If the
        length of the path exceeds the size specified by the nSize
        parameter, the function succeeds and the string is truncated to
        nSize characters and is null terminated.
        The path can have the prefix "\\?\", depending on how the module
        was loaded. For more information, see Naming a File.
        [in] Size of the lpFilename buffer, in TCHARs.

Return Values
If the function succeeds, the return value is the length of the string
copied to the buffer, in TCHARs. If the buffer is too small to hold the
module name, the string is truncated to nSize, and the function returns

If the function fails, the return value is zero. To get extended error
information, call GetLastError.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]