Advertisement
01cedric

LookupNPID

Jul 16th, 2016
835
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. //$(SCE_PS3_ROOT)\target\ppu\lib\libsysutil_np_stub.a
  2.  
  3. #include <np.h>
  4.  
  5. struct npclient_info_t {
  6.     SceNpId npId;
  7.     sys_ppu_thread_t cmd_tid;
  8.     struct Friendlist *friendlist;
  9.     int32_t titleCtxId;
  10.     int32_t lookupTitleCtxId;
  11.     int32_t tusTitleCtxId;
  12. };
  13.  
  14. int doLookupNpId(const char *onlineIdString, SceNpId *npId)
  15. {
  16.     int32_t ret, tmp;
  17.     int32_t transId = 0;
  18.     int32_t lookupTitleCtxId;
  19.  
  20.     SceNpOnlineId onlineId;
  21.  
  22.     memset(&onlineId, 0, sizeof(onlineId));
  23.     strncpy(onlineId.data, onlineIdString, SCE_NET_NP_ONLINEID_MAX_LENGTH);
  24.  
  25.     ret = sceNpLookupCreateTransactionCtx(lookupTitleCtxId);
  26.     transId = ret;
  27.  
  28.     ret = sceNpLookupNpId(transId, &onlineId, npId, NULL);
  29.    
  30.     return ret;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement