Back to index

nordugrid-arc-nox  1.1.0~rc6
Classes | Defines | Functions
win32.h File Reference
#include <string>
#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <io.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  passwd

Defines

#define NOGDI
#define WINVER   0x0501 /* we support XP or higher */
#define WIN32_LEAN_AND_MEAN
#define USE_WINSOCK   2
#define SIGPIPE   13
#define SIGTTIN   21
#define SIGTTOU   22
#define sleep(x)   Sleep((x) * 1000)
#define mkdir(x, y)   mkdir((x))
#define chown(x, y, z)   (0)
#define lchown(x, y, z)   (0)
#define fchown(x, y, z)   (0)
#define symlink(x, y)   (0)

Functions

std::string GetOsErrorMessage (void)

Class Documentation

struct passwd

Definition at line 30 of file win32.h.

Class Members
char * pw_age
char * pw_comment
char * pw_dir
char * pw_gecos
int pw_gid
char * pw_name
char * pw_passwd
char * pw_shell
int pw_uid

Define Documentation

#define chown (   x,
  y,
 
)    (0)

Definition at line 24 of file win32.h.

#define fchown (   x,
  y,
 
)    (0)

Definition at line 26 of file win32.h.

#define lchown (   x,
  y,
 
)    (0)

Definition at line 25 of file win32.h.

#define mkdir (   x,
 
)    mkdir((x))

Definition at line 22 of file win32.h.

#define NOGDI

Definition at line 5 of file win32.h.

#define SIGPIPE   13

Definition at line 18 of file win32.h.

#define SIGTTIN   21

Definition at line 19 of file win32.h.

#define SIGTTOU   22

Definition at line 20 of file win32.h.

#define sleep (   x)    Sleep((x) * 1000)

Definition at line 21 of file win32.h.

#define symlink (   x,
 
)    (0)

Definition at line 27 of file win32.h.

#define USE_WINSOCK   2

Definition at line 14 of file win32.h.

Definition at line 7 of file win32.h.

#define WINVER   0x0501 /* we support XP or higher */

Definition at line 6 of file win32.h.


Function Documentation

std::string GetOsErrorMessage ( void  )

Definition at line 9 of file win32.cpp.

                                  {
  std::string rv;
  LPVOID lpMsgBuf;
  if (FormatMessage(
        FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
        NULL,
        GetLastError(),
        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
        (LPTSTR)&lpMsgBuf,
        0,
        NULL))
    rv.assign(reinterpret_cast<const char*>(lpMsgBuf));
  else
    rv.assign("FormatMessage API failed");
  LocalFree(lpMsgBuf);
  return rv;
}

Here is the caller graph for this function: