SmileeTiger
Programmer
I am trying to get info on where the windows directory is stored using the getwindowsdirectory system call however for some reason the call crashes my program any idea what's wring with this piece of code?
Cory
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include "SystemInfo.h"
typedef BOOL (WINAPI *P_GDFSE)(LPCTSTR, PULARGE_INTEGER,
PULARGE_INTEGER, PULARGE_INTEGER); //For GetDiskInfo
void main (int argc, char **argv)
{
LPTSTR lpBuffer;
UINT uSize=256;
UINT tmp;
tmp = GetWindowsDirectory(
lpBuffer, // buffer for Windows directory
uSize // size of directory buffer
);
}
Cory
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include "SystemInfo.h"
typedef BOOL (WINAPI *P_GDFSE)(LPCTSTR, PULARGE_INTEGER,
PULARGE_INTEGER, PULARGE_INTEGER); //For GetDiskInfo
void main (int argc, char **argv)
{
LPTSTR lpBuffer;
UINT uSize=256;
UINT tmp;
tmp = GetWindowsDirectory(
lpBuffer, // buffer for Windows directory
uSize // size of directory buffer
);
}