get the computer name
This example will get the computer name
#include <stdio.h>
#include <windows.h>
#include <conio.h>
void main(void)
{
char szBuffer[256];
DWORD dwNameSize=256;
//get the computer name
GetComputerName(szBuffer, &dwNameSize);
//print name
printf(”%s \n”,szBuffer);
getch();
}
Related posts:
- get the type of disk #include #include #include int main() { char szBuffer[MAX_PATH+100]; DWORD dwLogicalDrives...
- change computer name change computer name using Visual Basic Declare Function SetComputerName Lib...
- Absread example #include #include #include #include int main(void) { unsigned char buffer[512];...
- Abswrite example #include #include #include #include int main(void) { unsigned char buffer[512];...
- Blinking text #include int main() { int color; textattr(128 + 10); cprintf(”This...
Related posts brought to you by Yet Another Related Posts Plugin.






















