Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void* GetInterface( DWORD_PTR dwModule, const char* lpInterfaceName )
- {
- CreateInterfaceFn CreateInterface = ( CreateInterfaceFn )Memory::GetProcAddressHash( dwModule, CREATE_INTERFACE_HASH );
- PVOID lpReturn = NULL;
- UINT i;
- if( !CreateInterface )
- return NULL;
- for( i = 0; i < 999; i++ )
- {
- char lpCurrent[ 1024 ];
- if( i >= 100 )
- sprintf( lpCurrent, "%s%i", lpInterfaceName, i );
- else if( i >= 10 )
- sprintf( lpCurrent, "%s0%i", lpInterfaceName, i );
- else
- sprintf( lpCurrent, "%s00%i", lpInterfaceName, i );
- lpReturn = ( PVOID )CreateInterface( lpCurrent, NULL );
- if( lpReturn )
- break;
- }
- return lpReturn;
- }
Advertisement
Add Comment
Please, Sign In to add comment