Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. how to make dll

how to make dll

Scheduled Pinned Locked Moved Visual Basic
csharpgraphicsgame-devhelp
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    giotis82
    wrote on last edited by
    #1

    I made an application with opengl and an application in VB.net and i want to make a dll to call from the VB app the opengl app and change his parameters from there..I know nothing about dlls does anyone can help me giving some steps?I try to make it in VB class library but i can't find how to call my opengl project,and how to change his parameters I am new in programming! Thank you... giotis

    C U 2 Replies Last reply
    0
    • G giotis82

      I made an application with opengl and an application in VB.net and i want to make a dll to call from the VB app the opengl app and change his parameters from there..I know nothing about dlls does anyone can help me giving some steps?I try to make it in VB class library but i can't find how to call my opengl project,and how to change his parameters I am new in programming! Thank you... giotis

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      giotis82 wrote:

      I am new in programming!

      Sounds like you're biting off too much at once. I presume the opengl app is in C++ ? If so, your basic problem is, your OpenGL program wants to be an app, not a dll, so that it has a message pump, a window, etc. Then, your VB app is not going to be able to consume this application. The way to talk between VB.NET and C++ is probably C++/CLI. The way to do it from VB6 -> C++ is COM. COM works for VB.NET as well. But if you want a VB app and an OpenGL app, then you don't want a dll, because you're looking for two applications, and not an application that consumes a class library. In this case, WM_COPYDATA is the easiest way to send data between two applications ( google it ). Christian Graus - Microsoft MVP - C++

      G 2 Replies Last reply
      0
      • C Christian Graus

        giotis82 wrote:

        I am new in programming!

        Sounds like you're biting off too much at once. I presume the opengl app is in C++ ? If so, your basic problem is, your OpenGL program wants to be an app, not a dll, so that it has a message pump, a window, etc. Then, your VB app is not going to be able to consume this application. The way to talk between VB.NET and C++ is probably C++/CLI. The way to do it from VB6 -> C++ is COM. COM works for VB.NET as well. But if you want a VB app and an OpenGL app, then you don't want a dll, because you're looking for two applications, and not an application that consumes a class library. In this case, WM_COPYDATA is the easiest way to send data between two applications ( google it ). Christian Graus - Microsoft MVP - C++

        G Offline
        G Offline
        giotis82
        wrote on last edited by
        #3

        Thanks for ur reply,yes the opengl app is in C++ and i use glui libraries!I have 2 more questions, with WM_COPYDATA can i pass parameters in my opengl app, and change my variables values? And the other question is that i try to copy my opengl code with his libraries to a "class library" app but there no response it stuck in all opengl libraries (glut,glu,glui, etc.). Is there any way to remake my opengl program as dll? Thanks for ur response! giotis

        C 1 Reply Last reply
        0
        • C Christian Graus

          giotis82 wrote:

          I am new in programming!

          Sounds like you're biting off too much at once. I presume the opengl app is in C++ ? If so, your basic problem is, your OpenGL program wants to be an app, not a dll, so that it has a message pump, a window, etc. Then, your VB app is not going to be able to consume this application. The way to talk between VB.NET and C++ is probably C++/CLI. The way to do it from VB6 -> C++ is COM. COM works for VB.NET as well. But if you want a VB app and an OpenGL app, then you don't want a dll, because you're looking for two applications, and not an application that consumes a class library. In this case, WM_COPYDATA is the easiest way to send data between two applications ( google it ). Christian Graus - Microsoft MVP - C++

          G Offline
          G Offline
          giotis82
          wrote on last edited by
          #4

          I have to mention that my problem is that: if the "VB.NET" user press a button it will appear my opengl form and with a properties menu the user can change some of the grafic sizes. giotis

          1 Reply Last reply
          0
          • G giotis82

            Thanks for ur reply,yes the opengl app is in C++ and i use glui libraries!I have 2 more questions, with WM_COPYDATA can i pass parameters in my opengl app, and change my variables values? And the other question is that i try to copy my opengl code with his libraries to a "class library" app but there no response it stuck in all opengl libraries (glut,glu,glui, etc.). Is there any way to remake my opengl program as dll? Thanks for ur response! giotis

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            giotis82 wrote:

            WM_COPYDATA can i pass parameters in my opengl app, and change my variables values?

            Yes, and no. WM_COPYDATA is a message you send and recieve. You need to write code on both ends, to send the data, and to parse and use it on the other end. So yes, you can send values to the other application, and use them to set variables. But no, you can't send a message and have it change values without you writing the code to recieve the message on the other end.

            giotis82 wrote:

            Is there any way to remake my opengl program as dll?

            Like I said, if it's a dll, then it's NOT a program, it does not have a window, nor can it be run by itself. I think you should instead use DirectX in VB.NET, if that's an option. Christian Graus - Microsoft MVP - C++

            G 1 Reply Last reply
            0
            • G giotis82

              I made an application with opengl and an application in VB.net and i want to make a dll to call from the VB app the opengl app and change his parameters from there..I know nothing about dlls does anyone can help me giving some steps?I try to make it in VB class library but i can't find how to call my opengl project,and how to change his parameters I am new in programming! Thank you... giotis

              U Offline
              U Offline
              uktrips007
              wrote on last edited by
              #6

              do you want dll to be created in vb.net? if yes then while selecting new project go for class library write ur function there, and save it then built it.it will create dll file inside bin directory of ur project folder. try to be the best... whereever you go,

              1 Reply Last reply
              0
              • C Christian Graus

                giotis82 wrote:

                WM_COPYDATA can i pass parameters in my opengl app, and change my variables values?

                Yes, and no. WM_COPYDATA is a message you send and recieve. You need to write code on both ends, to send the data, and to parse and use it on the other end. So yes, you can send values to the other application, and use them to set variables. But no, you can't send a message and have it change values without you writing the code to recieve the message on the other end.

                giotis82 wrote:

                Is there any way to remake my opengl program as dll?

                Like I said, if it's a dll, then it's NOT a program, it does not have a window, nor can it be run by itself. I think you should instead use DirectX in VB.NET, if that's an option. Christian Graus - Microsoft MVP - C++

                G Offline
                G Offline
                giotis82
                wrote on last edited by
                #7

                Thanks one more time for ur reply!That's mean that i must stop trying create a dll!Well i try to find an example using WM_COPYDATA but i didn't find something that could help me...Can u send me a simply code to understand it?That will be very helpful for me, as u already know the opengl window created in the "main" function so how it will be my WM_COPYDATA? As i think of what u said i must have a "send" and "receive" to each program. If u have a moment please send me a simply code in my mail "giotis82@mycosmos.gr" or just type it over here!! Thanks u very much for ur time!! giotis

                C 1 Reply Last reply
                0
                • G giotis82

                  Thanks one more time for ur reply!That's mean that i must stop trying create a dll!Well i try to find an example using WM_COPYDATA but i didn't find something that could help me...Can u send me a simply code to understand it?That will be very helpful for me, as u already know the opengl window created in the "main" function so how it will be my WM_COPYDATA? As i think of what u said i must have a "send" and "receive" to each program. If u have a moment please send me a simply code in my mail "giotis82@mycosmos.gr" or just type it over here!! Thanks u very much for ur time!! giotis

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  http://www.google.com.au/search?hl=en&q=WM_COPYDATA+VB.NET&meta=[^] Christian Graus - Microsoft MVP - C++

                  G 1 Reply Last reply
                  0
                  • C Christian Graus

                    http://www.google.com.au/search?hl=en&q=WM_COPYDATA+VB.NET&meta=[^] Christian Graus - Microsoft MVP - C++

                    G Offline
                    G Offline
                    giotis82
                    wrote on last edited by
                    #9

                    Well i call my opengl exe with "CWinApp: Shell("ExePath")" it work properly! As i thought the steps will be: 1. the opengl with the Sendmessage will send his variables 2. the VB will receive them 3. the VB will send the new values 4. the opengl will receive them and change each one Am i right? One more question:I have to do my variables global and place the WM_COPYDATA at the end of the main function? Thanks for ur time, u r very helpfull.......... giotis

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups