Hi,
Instead of adding my own custom dll's as references into my project, I want
to call it via declare statement. However, I'm having a few difficulties!
My dll contains a basic function :
Public Class MyDLL
Public shared function MyTestFunction (byval mystr as string)
try
return mystr & "Success"
catch ex as exception
msgbox("There has been an error!")
end try
End Function
End Class
My Test Application contains:
Module Main
Private Declare Auto Function MyTestFunction _
Lib "DLL Example.dll" _
Alias "MyTestFunction" _
(ByVal MyStr as String)
Sub Main()
MsgBox(MyTestFunction("Test was : "))
End Sub
End Module
An exception is thrown telling my that its "unable to find an entry point"
into the dll "DLL Example.dll"
Should I be doing something else within my dll to expose the function
(exported)?
Or am calling the dll within my application incorrectly?
SSO. 7 1446
"Simon Osborn" <so*****@microsoft.com> schrieb Instead of adding my own custom dll's as references into my project, I want to call it via declare statement. However, I'm having a few difficulties!
You can not write Standard DLLs with VB.NET. Set a reference to the assembly
in the project that requires the assembly. We live in an OO world nowadays.
--
Armin http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html
Hi Armin,
Again an OT and it is not only ment for you.
But you did write a little bit what I was thinking when I saw your last
messages.
I think (but I can be wrong), calling only API's, making a Webbrowser Helper
using only handles, making Dll librarys etc, is'not using VB.net but trying
to make things you never could do because you had to use C++. But now that
VB is OO it looks if some people are thinking that C++ is the same as
VB.net, try it and ask here.
In past I saw a lot of messages who told people to turn to the Asp.net group
while they where really writing VB language. Now I saw a very nice message
from Dimitry who told someone that he had a better change in the
dotnet.framework.interop newsgroup. And I did very much agree with him (Very
nice said of course by Dimitry).
But I can be wrong with my thought, what is your opinion?
Cor
"Cor" <no*@non.com> schrieb Hi Armin,
Again an OT and it is not only ment for you.
But you did write a little bit what I was thinking when I saw your last messages.
I think (but I can be wrong), calling only API's, making a Webbrowser Helper using only handles, making Dll librarys etc, is'not using VB.net but trying to make things you never could do because you had to use C++. But now that VB is OO it looks if some people are thinking that C++ is the same as VB.net, try it and ask here.
In past I saw a lot of messages who told people to turn to the Asp.net group while they where really writing VB language. Now I saw a very nice message from Dimitry who told someone that he had a better change in the dotnet.framework.interop newsgroup. And I did very much agree with him (Very nice said of course by Dimitry).
But I can be wrong with my thought, what is your opinion?
Cor
I read your post three times but, sorry again, I don't get the core (not Cor
;-) ) statement. Is it about posting to the right group, using pInvoke, or
whatever?
--
Armin
* "Armin Zingler" <az*******@freenet.de> scripsit: I read your post three times but, sorry again, I don't get the core (not Cor ;-) ) statement. Is it about posting to the right group, using pInvoke, or whatever?
The post contains some "thoughts".
;-)
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
* "Cor" <no*@non.com> scripsit: Again an OT and it is not only ment for you.
;-)
I think (but I can be wrong), calling only API's, making a Webbrowser Helper using only handles, making Dll librarys etc, is'not using VB.net but trying to make things you never could do because you had to use C++. But now that
ACK. .NET is not the preferred environment dordeveloping things like
this. I would use VC++ or VB Classic für these purposes.
VB is OO it looks if some people are thinking that C++ is the same as VB.net, try it and ask here.
That's a really big problem. Most people think that with the release of
VB.NET, VB isn't a "toy language" any more and they can write drivers
and other low-level stuff with it.
In past I saw a lot of messages who told people to turn to the Asp.net group while they where really writing VB language. Now I saw a very nice message
They were _using_ the VB.NET language. If I am working with an old COM
component in VB.NET, this group isn't the right place for placing the
questions about the COM component too. In this case, like in the case
of ASP.NET, VB.NET is only the tool. The question is _very often_ not
related to the programming language itself.
from Dimitry who told someone that he had a better change in the dotnet.framework.interop newsgroup. And I did very much agree with him (Very nice said of course by Dimitry).
:-)
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Hi Herfried, They were _using_ the VB.NET language. If I am working with an old COM component in VB.NET, this group isn't the right place for placing the questions about the COM component too. In this case, like in the case of ASP.NET, VB.NET is only the tool. The question is _very often_ not related to the programming language itself.
The big difference in using ASP.NET webforms and classic internet with COM
is that with ASP.NET forms you use completly VB.net language exactly in the
same way as with windowform. (While the controls and some other things are
different and needs another approach)
Cor
* "Cor" <no*@non.com> scripsit: They were _using_ the VB.NET language. If I am working with an old COM component in VB.NET, this group isn't the right place for placing the questions about the COM component too. In this case, like in the case of ASP.NET, VB.NET is only the tool. The question is _very often_ not related to the programming language itself.
The big difference in using ASP.NET webforms and classic internet with COM is that with ASP.NET forms you use completly VB.net language exactly in the
Sorry, I was not talking about ASP + COM, I was talking about the
difference between the programming language as a tool for using other
_technologies_ like p/invoke, COM, Windows Forms, ASP.NET, ADO.NET,
Remoting, ...
Yes -- language and technologies are overlapping, for example p/invoke
and VB.NET, ...
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Sakharam Phapale |
last post by:
Hi All,
How to declare the following statement in following structure.
szPname As String * MAXPNAMELEN
Public Structure MIXERCAPS
public wMid As Integer
public ...
|
by: iwdu15 |
last post by:
hi, i need to have a declare statement for an API to call a method in it, the
only problem is that i dont neccessarily know where on the comp it will be. I
kno it will be in my application folder,...
|
by: John Bailo |
last post by:
I created a sproc with 3 input parameters and one output parameter.
I want to test it in the "Run SQL Scripts" app of Navigator.
I wrote this code:
DECLARE RTNDATE CHAR(10) DEFAULT '';
CALL...
|
by: juan.gautier |
last post by:
Hi,
I try to construct a SQL code for a view to select a specific data
from a table, this query take the value of the filter from a text box
in a visual basic 6.0 form. my problem is when i...
|
by: okonita |
last post by:
Hi all,
My environment is DB2 UDBv8.2 on Windows and Linux.
I am getting a lot of errors on the script you see below. Some of the error I am geting are:
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |