EnableExplicit

Procedure.i GetResDataPos(*resName, *ResType, *ptrSize)
  Define.i xResult
  Define.i xLong1
  Define.i xLong2

  xLong1 = FindResource_(hInstance, *resName, *ResType)
  If xLong1
    xLong2 = LoadResource_(hInstance, xLong1)
    If xLong2
      xLong1 = SizeofResource_(hInstance, xLong1)
      If xLong1
        xResult = LockResource_(xLong2)
        If xResult
          If *ptrSize
            PokeI(*ptrSize, xLong1)
            EndIf
          EndIf
        EndIf
      EndIf
    EndIf
  ProcedureReturn xResult
  EndProcedure

; IDE Options = PureBasic 5.21 LTS (Windows - x86)
; CursorPosition = 2
; Folding = -
; EnableUnicode
; EnableXP