Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - DllImport doesn't work in ASP.NET for old C-style dlls

Reply
 
Old 04-10-2008   #1 (permalink)
Chris Bordeman


 
 

DllImport doesn't work in ASP.NET for old C-style dlls

Using VS2008.

Have an old straight C style dll (*NOT* *COM*), need to call it from
ASP.NET. This
normally works easily using DllImport but ASP.NET apparently doesn't let you
call C dlls directly.

So I heard you can call COM dlls by just adding a reference. So I created a
C# class library with a single class that wraps and calls my C dll through
DllImport. I checked the 'Make COM Visibile' option and compiled. Used
regasm.exe to register the dll w/ COM, which reported success.

But I do 'add reference' on the ASP.NET app and the object is not to be
found on the COM list.

Isn't it supposed to show up?

Is there a better way? Or a way to avoid COM altogether?


And the first person to respond with an example of how to use DllImport is
getting dropped kicked in the nuts cuz they didn't read the question. <g>



My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Font Size - XP style vs Vista style Vista General
Font Size - XP style vs Vista style Vista General
Font Size - XP style vs Vista style Vista General
Search order for DLLImport? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46