Back to index

lightning-sunbird  0.9+nobinonly
Functions
os2utils.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void GetModulePath (HMODULE aInstance, char *aPath, int aSize)
void GetINIFileName (HMODULE aInstance, char *aName, int aSize)

Function Documentation

void GetINIFileName ( HMODULE  aInstance,
char *  aName,
int  aSize 
)

Definition at line 61 of file os2utils.cpp.

{
  GetModulePath(aInstance, aName, aSize);
  strcat(aName, szINIFile);
}
void GetModulePath ( HMODULE  aInstance,
char *  aPath,
int  aSize 
)

Definition at line 43 of file os2utils.cpp.

{
  char sz[_MAX_PATH];
  DosQueryModuleName(aInstance, sizeof(sz), sz);
  char * p = strrchr(sz, '\\');
  if(p != NULL) {
    *++p = '\0';
    if((int)strlen(sz) < aSize) 
      strcpy(aPath, sz);
    else
      strcpy(aPath, "");
  }
  else
    strcpy(aPath, "");
}