All pastes #612104 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-07-10 05:57 UTC
rendered paste body
int sendCommandToDevice(am_recovery_device *rdev, void * cfs) {  //wrapper for private dll function
	int retval = 0;
#if defined (WIN32)
	asm("movl %3, %%esi\n\tpush %1\n\tcall *%0\n\tmovl %%eax, %2"
		:
	:"m"(wsendCommandToDevice),  "m"(cfs), "m"(retval), "m"(rdev)
		:); //"%esi"
#elif defined (__APPLE__)
	retval = wsendCommandToDevice(rdev, cfs);
#else
	cout << "sendCommandToDevice is not implmented on your platform." << endl;
#endif
	return retval;
}