Announcement

Collapse
No announcement yet.

Resource Help Please Lance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Resource Help Please Lance

    Hello...

    I know this topic has been talked to death but I just can't figure it out!
    I have Found, Loaded, and Locked resources before but I just can't seem
    to do it with PBDLLv6.0. I have no Idea what i'm doing wrong here.

    RCFILE:
    =======
    #include"d:\pbdll\include\resource.h"
    #define FRONT 100
    FRONT RCDATA d:\front.raw


    PBDLL source:
    =============
    %FRONT = 100

    dim hres1 as long
    dim hres2 as long
    dim htexture as long

    hres1 = FindResource(%NULL, byval %FRONT, byval %RT_RCDATA)
    hres2 = LoadResource(%NULL, hres1)
    htexture = LockResource(hres2)

    LoadResource() and LockResource() both return the same number. I have
    checked GetLastError() but it always returns zero. After the calls the
    variables are as follows.

    hres1 = 4219112
    hres2 = 4219208
    htexture = 4219208

    Please Help!! I am completely stumped!



  • #2
    You can not use %NULL for the instance handle. You have to use the instance handle of your application.

    Either use WinMain() instead of PbMain() or use GetModuleHandle() to get your instance handle.

    --Dave


    -------------
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Home of the BASIC Gurus
    www.basicguru.com

    Comment

    Working...
    X