Jump to content
Sign in to follow this  
jeantje

SharpDevelop

Recommended Posts

jeantje

Does anyone know how to create a dll in sharpdevelop vb.net that returns Hello World! when i call it with DllCall?


Share this post


Link to post
Share on other sites
Richard Robertson

There are many things wrong with that. First, SharpDevelop has nothing to do with the target file. It's just an editor.

Second, you cannot create .Net dlls that can be used with DllCall.

Share this post


Link to post
Share on other sites
jeantje

There are many things wrong with that. First, SharpDevelop has nothing to do with the target file. It's just an editor.

Second, you cannot create .Net dlls that can be used with DllCall.

Is it possible to use Visual C# 2008 or do I need to use Visual C++ 2008 or can I use SharpDevelop C#

Edited by jeantje

Share this post


Link to post
Share on other sites
Richard Robertson

You need a language that compiles to a native executable file. NOT .Net.

Share this post


Link to post
Share on other sites
jeantje

You need a language that compiles to a native executable file. NOT .Net.

Any example languages then and editors?


Share this post


Link to post
Share on other sites
Richard Robertson

C++ or VB work. There are plenty more.

And like I said earlier, the editor does not matter.

Share this post


Link to post
Share on other sites
Valik

Any example languages then and editors?

The fact that you have to ask a question like this probably means you shouldn't be doing whatever it is you want to do without a lot more experience.

Share this post


Link to post
Share on other sites
WideBoyDixon
Richard Robertson

First link, wrong. That's a COM interface.

Second link, wrong. That's about calling things from C#.

Share this post


Link to post
Share on other sites
JRowe

If you're bent on using DllCall, you can write a c++ dll that in calls the functions in a c# dll. From within AutoIt, you can then call the function in the c++ dll.

However interesting that might seem, I've been discovering that simplicity is the best goal in any software design. When you start seeing fragile chains of interwoven dll's and complicated interprocess communication, its time to step back and redesign your system.

Find the lowest common denominator, rewrite extraneous systems entirely in AutoIt, or reprogram the system in c++ in a way that's usable by AutoIt.

The c++ rewrite is the most valuable, in my experience, because you'll learn things that are useful and help you write more robust software. AutoIt is undoubtedly the best scripting language I know of, but it needs compiled languages to do heavy lifting. I recommend freebasic as the most compatible language, as you can use libraries and import functionality via the AutoIt plugin interface, and the syntax is more similar.

Share this post


Link to post
Share on other sites
evilertoaster

First link, wrong. That's a COM interface.

If the goal is using C# code from AutoIt, it's a means to an end...Keyword there is 'simulate'

Second link, wrong. That's about calling things from C#.

It is the wrong link... Here we go- http://msdn.microsoft.com/en-us/library/ms235281(VS.80).aspx

Which is what JRowe was talking about.

Share this post


Link to post
Share on other sites
Richard Robertson

Third link, still wrong. That is still using native objects in C#.

Share this post


Link to post
Share on other sites
JRowe

Here's c++ calling c#, enough to get you started on learning what's going on. Pay particular attention to this article. Use it as a basis for expanding your search and drilling down til you find what you want.

http://www.codeproject.com/KB/cs/InterOp.aspx

http://www.autoitscript.com/forum/index.php?showtopic=15279

Here's AutoIt's plugin interface. With this, you can make a function in c/c++ which is callable by AutoIt as if it were built in to the language.

http://www.autoitscript.com/forum/index.php?showtopic=34874

Plugins can also be written in FreeBasic, which can also call c# dlls, I think (you'd have to ask on their forums, though.)

I would recommend learning FreeBasic and skipping C#, for no better reason than the fact that I like FreeBasic, and it's easily used in AutoIt. For some reason, BASIC syntax appeals to me, and FB is a real, compiled language, so you have almost the power of C, and the flexibility of AutoIt. C# is grand, but it's also just another language. If you don't have a specific reason to use it, check

If you want, I can guide you through learning to use the FB plugins, as I'm in the middle of it myself. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×