How can I use GMap.NET dll in delphi? - c#

I'm a C# programmer who use GMap.NET for C# for a long time!
Now I want to know if I can use its dll files in Delphi.
I've tried to import its dll files in a VCL Forms Application in Delphi EX3 and add GMapControl to a form. But I don't know how to use it now! For example GMapControl has lots of properties in C#. like Position, Zoom, etc. But now I can't see these properties in GMapControl that is imported into Delphi.
I'm looking for a way to use it in Delphi and if it's not possible, I would be glad to know this fact in order not to waste time on it anymore!
thanks in advance for any help.

Related

How to pass images between C# and Ironpython with opencv (or Emgucv)

I'm working on a project which involves image processing being done in Python and finally the result must be displayed on a WPF UI. I've heard that it is possible to pass data (integer, string, ... etc) between C# and Python using Ironpython, but I couldn't find any solution for my problem. Can somebody help me out, I really appreciate it. Thank you !

control a wpf from matlab by using a c# dll

i would like to know weather it is possible to control some wpf application written in c# by using a c# dll out of matlab.
what i need is the possibility to start the MainWindow and i have to be able
to get some values into my controller.
What i found so far was things working from c# that use matlab, but the other way round seems not to be that much populatet, as i found nothing i could really use.
I allready tried to import a .net Library, but i dont seem to be able to open a external class from my dll.
So if you could help me on this it would be great.
Regards,
justSomeone
Ok, i did just find out, that i can also import my .exe file into Matlab instead of only dlls .
I am using the function NET.addAssebly('Path.exe') to do this.
Path.exe is just a symbol that it is directed to the place of the .exe file.
I achieved to be able to use my methods as i wanted i do have my instance of the class. So i am happy now. :D
But if you have other solutions which are more handy, dont hesitate to post them. There might still be interesting things to discover :)
Regards,
justSomeone

in C#, calling third party API (C++)

Was wondering if anyone would be so kind to point me in the right direction on how to call a third party's C++ DLL in C#. The API is closed source but the header files are available.
I've read up on using P/Invoke but after further diving, it's leading to marshalling very complex data structures across, and that's IF I can do the declarations for the third party classes/functions.
If there's any reading material / tutorials out there you can recommend or just point me in the right direction, I would appreciate it.
Thanks so much in advance
I found http://www.pinvoke.net/ to be very helpful.
Also the http://clrinterop.codeplex.com/releases/view/14120
Additionally, what I did that I found helpful was to do a test solution. Start off with making a C# console app that initially does nothing, then make another Project (File, New, Project, Visual C++, Win32 Console Application)
When the Wizard appears, choose DLL, Export symbols, (ATL and/or MFC if you need that).
When the Project appears, compile it as is and copy the DLL to you output folder of you C# Project
Use the P/Invoke Interop Assistant to generate the C# method based on the header (I'd start with the function that takes no params and returns an int.)
then call that from your C# console app.
Once I'd established how it worked with something really simple it was much easier to expand a bit at a time.
Try writing the C# calls yourself and then use the P/Invoke Interop Assistant to double check. Best wishes.

Reading a File While Being Written to by Another Program(Windows)

So basically, I'm trying to read a log file from a game while that game is running in order to have my program react to it in dynamic ways. I know it's possible, as other programs such as Notepad(++) are able to do it. However, after searching for an answer, most of what I can come up with is only Linux related.
I have no idea as to how to go about this, help in doing so with either C++ or C# would be great. Even though I would prefer native C++ over C#.
The "native" winapi solution is CreateFile, and in particular its dwShareMode parameter.

how to call Photoshop cs5 function from C#?

Making a winform in C#,there are several buttons, Click the button to achieve the photoshop cs5 functions through the ps'dll ? All I know is c# call cs4's functions through "interop.photoshop.dll", but I don't know which dll I should call in cs5. I can't find any info about c# in PS cs5 SDK,it't all about andriod,ios... Can anybody help me ???
You can download the Photoshop CS5 SDK with all documentation (including all on the COM interfaces) at http://www.adobe.com/devnet/photoshop/sdk/eula.html
It comes with samples/source code too...
I had such problem 2 days ago
First, look here:
http://www.pcpix.com/Photoshop/
You must download script listener plugin for photoshop, then convert JS script to c# language.
I test it with Photoshop CS6. all works fine. You can do almost all functions and parametrize them.
JS code is not small, so to convert it manualy you need to spend a lot of time.
I created an software that do it within one click.
You can download it from https://sourceforge.net/projects/js2cconverterphotoshopscript/
Hope it will be useful

Categories