Results 1 to 2 of 2

Thread: Dll Problem

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2001
    Location
    belguim
    Posts
    61

    Dll Problem

    if i create a function in a Actieve dll (Its for my 3d engine)
    then i have a problem
    the problem will be in the in this line :
    Set D3DDevice = D3D.CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL, FrmMain.Hwnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,D3DWindow

    If i compile the dll and use it into a project then the FrmMain.Hwnd dosnt work cause the dll have no forms so how can i call it into the dll to use a project sort of that please help me out

    :-)
    here is the source
    ------------------------------------
    Public Function Initialise() as Boolean
    On Error Goto ErrHandler:

    Dim DispMode As D3DDISPLAYMODE
    Dim D3DWindow as D3DPRESENT_DEFAULT,DispMode

    Set Dx = New Directx8
    Set D3D = Dx.Direct3DCreate()

    D3D.GetAdapterDisplayMode D3DSWAPEFFECT_COPY_VSYNC,DispMode

    D3DWindow.Windowed = 1
    D3DSwapEffect = D3DSWAPEFFECT_COPY_VSYC
    D3DWindow.BackBufferFormat = DispMode.Format

    Set D3DDevice = D3D.CreateDevice_(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,_ FrmMain.Hwnd,D3DCREATE_SOFTWARE_VERTEXPROCESS_ING,D3DWindow
    Initialise = True
    Exit Function
    ErrHandler:
    Initialise = False
    End Function

  2. #2
    Member
    Join Date
    Dec 2000
    Location
    UK
    Posts
    39
    How about passing the Form object (or just it's hWnd) as a parameter to the Function?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width