Hi

I need to call Delphi DLL from my VB.NET application. I try to add a
reference into my Visual Studio Solution but an error occurs saying that it
must be an COM DLL.

I have many Delphi DLL from an old application and to rewrite then I will
take a lot of time.

There are any other way to do this instead convert to COM DLL ? Where can I
find examples ?

Regards
Ricardo

RE: Using Delphi DLL from VB.NET by NoSpamMgbworld

NoSpamMgbworld
Fri Jul 22 12:38:03 CDT 2005

You will most likely end up getting into Windows API calls. If you have used
this before from COM, make a wrapper. Sure, you end up with two wrappers (one
for Delphi and one for your COM component), but it can work.

The other direction is to look at how other non-COM components are called
(PInvoke?). A quick google search should have at least one API type example.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************


"Ricardo Magalhaes" wrote:

> Hi
>
> I need to call Delphi DLL from my VB.NET application. I try to add a
> reference into my Visual Studio Solution but an error occurs saying that it
> must be an COM DLL.
>
> I have many Delphi DLL from an old application and to rewrite then I will
> take a lot of time.
>
> There are any other way to do this instead convert to COM DLL ? Where can I
> find examples ?
>
> Regards
> Ricardo
>
>
>

Re: Using Delphi DLL from VB.NET by Ricardo

Ricardo
Fri Jul 22 13:07:01 CDT 2005

And About Using:

Namespace System.Runtime.InteropServices
<DllImport("DllCodeCpp.dll")>

?????


"Cowboy (Gregory A. Beamer) - MVP" <NoSpamMgbworld@comcast.netNoSpamM>
escreveu na mensagem
news:E3FA0803-9FFF-48D9-A2B2-79B1CC4AB790@microsoft.com...
> You will most likely end up getting into Windows API calls. If you have
> used
> this before from COM, make a wrapper. Sure, you end up with two wrappers
> (one
> for Delphi and one for your COM component), but it can work.
>
> The other direction is to look at how other non-COM components are called
> (PInvoke?). A quick google search should have at least one API type
> example.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> ***************************
> Think Outside the Box!
> ***************************
>
>
> "Ricardo Magalhaes" wrote:
>
>> Hi
>>
>> I need to call Delphi DLL from my VB.NET application. I try to add a
>> reference into my Visual Studio Solution but an error occurs saying that
>> it
>> must be an COM DLL.
>>
>> I have many Delphi DLL from an old application and to rewrite then I will
>> take a lot of time.
>>
>> There are any other way to do this instead convert to COM DLL ? Where can
>> I
>> find examples ?
>>
>> Regards
>> Ricardo
>>
>>
>>



Re: Using Delphi DLL from VB.NET by Atul

Atul
Fri Jul 22 13:21:40 CDT 2005

If it is a COM dll, you can still access it by using COM Interop. You can
add references to COM dlls in a VS project. Also take a look at tlbimp.exe
tool.

-Atul
http://www.ssware.com/
Shell MegaPack - Windows Explorer Shell Controls for ActiveX and .Net


"Ricardo Magalhaes" <rmagalhaes@fafire.br> wrote in message
news:eSSN3MujFHA.3784@tk2msftngp13.phx.gbl...
> Hi
>
> I need to call Delphi DLL from my VB.NET application. I try to add a
> reference into my Visual Studio Solution but an error occurs saying that
> it must be an COM DLL.
>
> I have many Delphi DLL from an old application and to rewrite then I will
> take a lot of time.
>
> There are any other way to do this instead convert to COM DLL ? Where can
> I find examples ?
>
> Regards
> Ricardo
>
>



Re: Using Delphi DLL from VB.NET by Nick

Nick
Sun Jul 24 15:05:29 CDT 2005

It looks like you are saying that you have a DLL that is NOT a COM dll,
written in Delphi, and that you wish to call it from your vb.net app.

You can do this with PInvoke. If your app had been written in C++, I'd say
to use a managed C++ wrapper.

Start here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vaconCallingWindowsAPIs.asp

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Ricardo Magalhaes" <rmagalhaes@fafire.br> wrote in message
news:eSSN3MujFHA.3784@tk2msftngp13.phx.gbl...
> Hi
>
> I need to call Delphi DLL from my VB.NET application. I try to add a
> reference into my Visual Studio Solution but an error occurs saying that
> it must be an COM DLL.
>
> I have many Delphi DLL from an old application and to rewrite then I will
> take a lot of time.
>
> There are any other way to do this instead convert to COM DLL ? Where can
> I find examples ?
>
> Regards
> Ricardo
>
>