Win32 calls using C/asm


#include <stdio.h>
#include <windows.h>


int doasm( char *szComputerName, long *nSize ){
   __asm{
		push nSize
		push szComputerName
		call dword ptr [GetComputerName]
	}
   /* return EAX */
}



void main( void ){
	long nSize ;
	char szComputerName[255];
	long nRet;

	nSize=255;
	ret=doasm(szComputerName,&nSize);
	printf( "%s\n",  szComputerName);
}

1
Hosted by www.Geocities.ws