Stupid question
-
It depends what that dll file is! not all .dll files are the same thing, confusing I know! So, if it is another dll written in .NET, then you just add a reference to the dll (are you using Visual Studio?) If it is a COM dll, then you can still add a reference, and if using Visual Studio it will do the "hard work" for you. If it is a windows dll then you often have to call them using pinvoke... this is a little complex if you are a beginner.... i hope its one of the above! Hope that helps buddy, 15 is a good age to start learning to program!
-
It depends what that dll file is! not all .dll files are the same thing, confusing I know! So, if it is another dll written in .NET, then you just add a reference to the dll (are you using Visual Studio?) If it is a COM dll, then you can still add a reference, and if using Visual Studio it will do the "hard work" for you. If it is a windows dll then you often have to call them using pinvoke... this is a little complex if you are a beginner.... i hope its one of the above! Hope that helps buddy, 15 is a good age to start learning to program!
Here is the link: http://r2.d2.hu/snf/sound\_tools/freeware\_gpl/free\_bladeenc\_encoder\_player\_editor\_wav\_mp3\_ogg\_rip\_convert\_encode\_tracker.html I only know how to use variables, load files, save files and some other basics :P
-
-
teuneboon, Here's a fairly basic article on CP about P/Invoke. http://www.codeproject.com/dotnet/PInvoke.asp[^] Hope this helps, progload
-
Here is the link: http://r2.d2.hu/snf/sound\_tools/freeware\_gpl/free\_bladeenc\_encoder\_player\_editor\_wav\_mp3\_ogg\_rip\_convert\_encode\_tracker.html I only know how to use variables, load files, save files and some other basics :P
-
If you are talking about a Win32 API DLL, you do it like this: Declare Function (or Sub) (FunctionName) Lib (Dllname) Alias (Function Name in DLL) then the arguments. for instance: Declare Function MsgBox Lib "user32.dll" _ Alias "MessageBox" (ByVal hWnd As Integer, _ ByVal txt As String, ByVal caption As String, _ ByVal Type As Integer) As Integer Then you could call it like any other function. There is more info about this here: http://kpdweb.cjb.net/
-
that's a great help:-D sorry but not really, none of the codes works -- modified at 16:34 Thursday 23rd February, 2006
teuneboon, What do you mean by it doesn't work? I works in my vb.net... Declare Auto Function MyMessageBox Lib "user32.dll" Alias _ "MessageBox" (ByVal hWnd As Integer, ByVal msg As String, _ ByVal Caption As String, ByVal Tpe As Integer) As Integer Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click MyMessageBox(0, "Hello World !!!", "Project Title", 0) End Sub progload
-
teuneboon, What do you mean by it doesn't work? I works in my vb.net... Declare Auto Function MyMessageBox Lib "user32.dll" Alias _ "MessageBox" (ByVal hWnd As Integer, ByVal msg As String, _ ByVal Caption As String, ByVal Tpe As Integer) As Integer Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click MyMessageBox(0, "Hello World !!!", "Project Title", 0) End Sub progload
-
If you're using PInvoke, you probably want to check out www.pinvoke.net, they may have done the hard yards for you already. I was 13 when I started coding. *sigh* That was in 1982. Christian Graus - Microsoft MVP - C++
-
If you're using PInvoke, you probably want to check out www.pinvoke.net, they may have done the hard yards for you already. I was 13 when I started coding. *sigh* That was in 1982. Christian Graus - Microsoft MVP - C++
The early 80s were a good time to start coding. :-D It brings back the memories. My dad borrowed a Commodore Pet from work when I was 6. A friend had a Sinclair ZX81 and then my dad bought a ZX Spectrum in 1983. ColinMackay.net Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
-
The early 80s were a good time to start coding. :-D It brings back the memories. My dad borrowed a Commodore Pet from work when I was 6. A friend had a Sinclair ZX81 and then my dad bought a ZX Spectrum in 1983. ColinMackay.net Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
Yeah, I was aware of all those platforms. I learned on an Applle ][, only when I blew it up did I buy a C64, and then a slew of Amigas over the years. I often think if I'd not tried to build an NMI card, I'd be one of 50 people worldwide writing software for the Mac today. Christian Graus - Microsoft MVP - C++
-
teuneboon, hmmm... I guess i won't be able to help, It works here on mine just fine. sorry, progload
-
I now know how it works (I inserted the code in a form :S) but the call fuction doesn't work in my form when I want to call the class1 file
teuneboon, If you want to put the Delcare Auto Function... in Class1 and then Call it from Form1, do this: Change the line in your Form1 Button1_Click that reads: MyMessageBox(0, "Hello World !!!", "Project Title", 0) Change it to this: Call Class1.MyMessageBox(0, "Hello World !!!", "Project Title", 0) progload
-
teuneboon, If you want to put the Delcare Auto Function... in Class1 and then Call it from Form1, do this: Change the line in your Form1 Button1_Click that reads: MyMessageBox(0, "Hello World !!!", "Project Title", 0) Change it to this: Call Class1.MyMessageBox(0, "Hello World !!!", "Project Title", 0) progload