#include
#include
#define bufferSize 256
int main(){
TCHAR infoBuf[bufferSize];
DWORD bufCharCount = bufferSize;
GetUserName(infoBuf,&bufCharCount);
wprintf(L"kulanici adi : %s\n",infoBuf);
bufCharCount = bufferSize;
GetComputerName(infoBuf,&bufCharCount);
wprintf(L"bilgisayar adi : %s\n",infoBuf);
DWORD vers=GetVersion();
wprintf(L"%d\n",vers);
UINT uBufCharCount=bufferSize;
GetSystemDirectory(infoBuf,uBufCharCount);
wprintf(L"sistem dizini : %s\n",infoBuf);
SYSTEMTIME st;
GetSystemTime(&st);
wprintf(L"sistem zamani : %02d:%02d \n",st.wHour,st.wMinute);
}
-------------------------
#include
#include
#include
int main( void )
{
PROCESS_INFORMATION pi;
STARTUPINFO si = {sizeof( si )};
PVOID pAddress;
char message[] = "I am a message from wrProc.exe!...";
SIZE_T dw;
if ( !CreateProcessW( NULL, L"rdProc.exe", NULL, NULL, TRUE,
CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi ) ) {
fprintf( stderr, "Cannot create process!..\n" );
exit( EXIT_FAILURE );
}
printf( "Enter \"rdProc.exe\" data address : " );
scanf( "%lx", &pAddress );
if ( !WriteProcessMemory( pi.hProcess, pAddress, message,
strlen( message ), &dw ) ) {
fprintf( stderr, "Cannot write memory!..\n" );
exit( EXIT_FAILURE );
}
WaitForSingleObject( pi.hProcess, INFINITE );
return 0;
}
------------------------
#include
#include
int main(){
MEMORYSTATUSEX mi;
mi.dwLength = sizeof (mi);
GlobalMemoryStatusEx(&mi);
ULONGLONG TotalMemoryInKilobytes;
GetPhysicallyInstalledSystemMemory(&TotalMemoryInKilobytes);
wprintf(L"fiziksel ram= %d mb\n",TotalMemoryInKilobytes/1024);
wprintf(L"toplam bellek= %d mb\n",mi.ullTotalPhys/1024/1024);
}
-------------------------
#include
#include
int main(){
int i=0;
DWORD ilkZaman= GetTickCount();
for (i=0;i=1000000000;i++);
DWORD sonZaman= GetTickCount();
DWORD zamanAraligi=sonZaman-ilkZaman;
wprintf(L"%d \n",zamanAraligi);
}
--------------------
#include
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){
TCHAR infoBuf[MAX_COMPUTERNAME_LENGTH + 1];
DWORD bufCharCount = MAX_COMPUTERNAME_LENGTH + 1;
GetComputerName( infoBuf, &bufCharCount );
MessageBox(
NULL,
infoBuf,
"Bilgisayar Adı",
MB_OK
);
return 0;
}
------------------------------
#include
#include
#define BUF_SIZE 256
int main(){
TCHAR infoVal[BUF_SIZE];
ULONG chCount = 30;
GetComputerName(infoVal,&chCount);
wprintf(L"%s\n",infoVal);
}
#include
#include
#define bufferSize 256
int main(){
TCHAR infoBuf[bufferSize];
DWORD bufCharCount = bufferSize;
GetUserName(infoBuf,&bufCharCount);
wprintf(L"kulanici adi : %s\n",infoBuf);
bufCharCount = bufferSize;
GetComputerName(infoBuf,&bufCharCount);
wprintf(L"bilgisayar adi : %s\n",infoBuf);
DWORD vers=GetVersion();
wprintf(L"%d\n",vers);
UINT uBufCharCount=bufferSize;
GetSystemDirectory(infoBuf,uBufCharCount);
wprintf(L"sistem dizini : %s\n",infoBuf);
SYSTEMTIME st;
GetSystemTime(&st);
wprintf(L"sistem zamani : %02d:%02d \n",st.wHour,st.wMinute);
}
-------------------------
#include
#include
#include
int main( void )
{
PROCESS_INFORMATION pi;
STARTUPINFO si = {sizeof( si )};
PVOID pAddress;
char message[] = "I am a message from wrProc.exe!...";
SIZE_T dw;
if ( !CreateProcessW( NULL, L"rdProc.exe", NULL, NULL, TRUE,
CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi ) ) {
fprintf( stderr, "Cannot create process!..\n" );
exit( EXIT_FAILURE );
}
printf( "Enter \"rdProc.exe\" data address : " );
scanf( "%lx", &pAddress );
if ( !WriteProcessMemory( pi.hProcess, pAddress, message,
strlen( message ), &dw ) ) {
fprintf( stderr, "Cannot write memory!..\n" );
exit( EXIT_FAILURE );
}
WaitForSingleObject( pi.hProcess, INFINITE );
return 0;
}
------------------------
#include
#include
int main(){
MEMORYSTATUSEX mi;
mi.dwLength = sizeof (mi);
GlobalMemoryStatusEx(&mi);
ULONGLONG TotalMemoryInKilobytes;
GetPhysicallyInstalledSystemMemory(&TotalMemoryInKilobytes);
wprintf(L"fiziksel ram= %d mb\n",TotalMemoryInKilobytes/1024);
wprintf(L"toplam bellek= %d mb\n",mi.ullTotalPhys/1024/1024);
}
-------------------------
#include
#include
int main(){
int i=0;
DWORD ilkZaman= GetTickCount();
for (i=0;i=1000000000;i++);
DWORD sonZaman= GetTickCount();
DWORD zamanAraligi=sonZaman-ilkZaman;
wprintf(L"%d \n",zamanAraligi);
}
--------------------
#include
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){
TCHAR infoBuf[MAX_COMPUTERNAME_LENGTH + 1];
DWORD bufCharCount = MAX_COMPUTERNAME_LENGTH + 1;
GetComputerName( infoBuf, &bufCharCount );
MessageBox(
NULL,
infoBuf,
"Bilgisayar Adı",
MB_OK
);
return 0;
}
------------------------------
#include
#include
#define BUF_SIZE 256
int main(){
TCHAR infoVal[BUF_SIZE];
ULONG chCount = 30;
GetComputerName(infoVal,&chCount);
wprintf(L"%s\n",infoVal);
}