13.07.2015 Views

TRABAJO DE GRADUACIÓN - DSpace Universidad Don Bosco

TRABAJO DE GRADUACIÓN - DSpace Universidad Don Bosco

TRABAJO DE GRADUACIÓN - DSpace Universidad Don Bosco

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DllMain is called when the dll is first loaded/unloadedBOOL APIENTRY DllMain( HANDLE hModule,DWORD ul_reason_for_call,LPVOID lpReserved){switch (ul_reason_for_call){case DLL_PROCESS_ATTACH:case DLL_THREAD_ATTACH:lastUsed = NULL;break;case DLL_THREAD_<strong>DE</strong>TACH:case DLL_PROCESS_<strong>DE</strong>TACH:if(lastUsed) {free(lastUsed);lastUsed = NULL;}break;}return TRUE;}/*** Read a string from the registry, specifically from root\base_key\sub_key\location*/WCHAR * regReadString(HKEY root, LPCTSTR base_key, LPCTSTR sub_key, LPCTSTR location) {LONG lResult = 0;HKEY hKey = NULL;DWORD dwBytesRead = 6000;WCHAR result[6000];WCHAR *ret = NULL;WCHAR full_key[10000];memset(full_key,0,sizeof(full_key));wsprintf(full_key,L"%s\\%s",base_key,sub_key);lResult = RegOpenKeyEx(root,full_key,0,KEY_QUERY_VALUE,&hKey);if(lResult == ERROR_SUCCESS) {lResult = RegQueryValueEx(hKey,location,NULL,NULL,(LPBYTE)&result,&dwBytesRead);}if(lResult == ERROR_SUCCESS) {if(dwBytesRead > 0) {ret = _tcsdup(result);}}RegCloseKey(hKey);}return ret;/* Removido para eliminar la funcionalidad de phidget *//*int __stdcall RFID_Handler(CPhidgetRFIDHandle RFID, void *userptr, unsigned char *buf){wsprintf(rfId,L"%x%x%x%x%x%x%x%x%x%x\n", buf[0]/16,buf[0]%16,buf[1]/16,buf[1]%16,buf[2]/16,buf[2]%16, buf[3]/16,buf[3]%16, buf[4]/16,buf[4]%16);return 0;}// This thread runs in the background, executing successive reads until time is upDWORD WINAPI RFID_ThreadedRead(LPVOID lpdwParam){int result;CPhidgetRFIDHandle RFID = (CPhidgetRFIDHandle )lpdwParam;while (1){result = CPhidgetRFID_read(RFID);if (result) break;}return 0;}*/// This is our entrypoint, where the PollGina calls usPOLLIB_API void pollFunction(LPTSTR loginUsername,LPTSTR loginPassword,LPTSTR loginDomain) {- 188 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!