Converting .Net To Delphi (API Stuff)?

May 8, 2011

Dim ThisModule As IntPtr
Dim Proc As Process() = Process.GetProcessesByName("Sol")
For i = 0 To Proc(0).Modules.Count - 1

[code]....

I have made this code, and works perfectly, but now... i want to make it in Delphi, the problem is... i have not the enough knowledge for make it, and... in google, i haven't found the information i need.

View 2 Replies


ADVERTISEMENT

Code Conversion Tool For Converting Delphi

Nov 18, 2009

Is there any code conversion tool for converting Delphi to Visual Basic?

View 3 Replies

Converting Visual Basic Parallel Port App Using Inpout32.dll In To Delphi?

Nov 23, 2011

I've been given this simple VB application and library which I'm told can open a door/turnstyle attached to the printer port at 0x378 base address.'Inp and Out declarations for port I/O using inpout32.dll.

Public Declare Function Inp Lib "inpout32.dll" Alias "Inp32" _
(ByVal PortAddress As Integer) _
As Integer

[code]....

how to declare the library functions and what to declare the variables as (&H378 is obviously not an integer)

View 2 Replies

Using Delphi 7 To Try To Use A .DLL

Jan 25, 2010

I am using Delphi 7 to try to use a .DLL created by VB.net. When I run TDUMP.EXE on the .DLL, it reports no exported data available. The VB.Net .DLL uses "RaiseEvent" to return data.[code]

View 1 Replies

C# :: Delphi To .NET Converter?

Sep 4, 2010

.NET converter (either C# or VB.NET)? I've inherited a bunch of Delphi code, never seen Pascal before and rather than learn it, I'd rather just try to use an automated converter, if available, and clean up the code after that. Can't seem to find this kind of tool anyway I search

View 3 Replies

Calling A Function From A Delphi DLL In .NET?

Sep 27, 2011

I've designed a Windows Service in Visual Basic 2005 that needs to call some functions from a DLL written in Delphi 5. If I try to add this DLL as a reference, I get this error:

"A reference to 'C:ProjectsServiceProMDPUpdateServiceMessageStubApplicationSPHost.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."

I assume that it is just not possible to add this DLL as a reference to my VB2005 project, since the DLL was written in an old version of Delphi, correct? This isn't a big deal, as I can just use the DllImport function from System.Runtime.InteropServices, but if it is possible, adding it as a reference would be preferred.

My other question is, how would you be able to call a function from the DLL using DllImport, if the function you are trying to call takes a Delphi record data type as a parameter (if this is possible)? If possible, would I need to pass each field in the record separately or would I be able to define a structure in my VB app that mirrors the record definition in the Delphi DLL and pass that? Or, would it be best if I just created another function in the Delphi DLL that took various string/integer/boolean/etc. parameters that I could call from VB that would then call the original function in Delphi? I tried searching the internet for this specific question, but I couldn't find anything that looked useful.

[Code]...

View 1 Replies

Calling Delphi DLL With 'Type'

Jun 10, 2010

I've gotten a DLL from a supplier. Most functions I can call just fine, but some crash (System.ExecutionEngineException, doesn't even do with a try-catch...). The thing is that the ones that work are called with simply types, and the ones that crash have a type/class/structure in it.The documentation states how to call with "Visual Basic" without stating version. Here's how it looks..[code]I did figure out to use "Integer" in stead of "Long" and the strings needed some work but are fine now.Now... The "Type" doesn't exist in VB.NET so what should I do. Tried a class but that didn't work.I can call the DLL with "bad" data and get a good reply, eg "this and that is wrong with the input", but when I set that straight it crashes. I suspect that it's when it starts to write in the memory allocated by me and that does not match what the DLL expect.

BTW when I look at the class I made, I can see that - at least VS - lists the members in an alfabetical order. Is that how it's arranged in memory and could that be the problem if the order is different from the one expected by the DLL. I would epect that the total size was the same irrespective of order, so the problem would arise when I try to read the data and I would get junk.

View 2 Replies

Convert A Delphi Application?

Nov 10, 2009

I get to convert a Delphi application to VB.Net.My last project i had to convert a Java app to VB.Net.Anyway I have most of the application converted however there are a few items that i have been unable to find the .Net equivalent. Most are from the Delphi. Sysutils class.

TSearchRec
FindFirst/FindNext/FindClose
faAnyfile[code].....

View 5 Replies

Delphi String Marshaling In .NET?

Jan 24, 2012

I've got some functions I need to call that are in some DLL files that have been written in Delphi 5 in a VB.NET 2005 application. I'm able to use the DllImport function to access the functions just fine; however, I'm having an issue with the Delphi string data type and passing it to and from the .NET application.

[Code]...

It takes two string parameters and one double. I can call this function from VB.NET just fine, but it will error as soon as it tries to use one of the string variables (so in this case, when it passes them to another function) and I've found that the string values in Delphi are junk when they've been passed to .NET. I'm guessing that the string objects behave and/or are encoded differently between .NET & Delphi 5, and that I have to apply some sort of Marshaling to the function parameters in .NET, but I've tried all of the different types of marshaling and nothing has worked. Unfortunately, I haven't been able to find anything about this issue on the internet.

Does anyone know how I can call this Delphi function from .NET and have it pass the string values in a manner so that they won't be corrupted when stored in Delphi?

View 2 Replies

Transfer Interfaces From Delphi Dll?

Apr 22, 2011

I have a Delphi written DLL that exposes some interfaces to a vb.net application.
The interfaces inherit from IUnknown (but this could be changed if required), simplified example:

IWindow = interface(IUnknown)
['{E9A11D0B-8A05-4CBA-83FA-C5CC6818DF6E}']
function GetCaption(var Caption: PChar): HRESULT; stdcall;
end;

[Code]....

Now I want to transfer a collection of IWindow to vb.net, and in the vb.net application I want to be able to loop through it with a for in loop.

I read that it's possible using IEnumerable/IEnumerator but I don't quite understand how to implement them. Are there any good tutorials about this, specifically showing the declarations on both side? Example code would be great.

Please note that I prefer not create a com dll that should be registered and imported. Currently I export a function that enabled me to obtain an interface.

View 1 Replies

Communicating Via RS232 - Dll / Delphi Win32 Exe?

Sep 23, 2011

I have a Delphi program that communicates with a vb.net dll that I created. The vb.net dll communicates with a Fluke scope meter via an RS232 connection. I have created a program that communicates correctly via RS232, giving me the anticipated value. Though, when I package this up as a dll and access the dll from my Delphi program I always receive a value of "1", rather than the value I was expecting (most cases a value in and around 240).I know that my delphi program is definitely communicating correctly with the dll and that my dll is definitely communicating with the scope meter

Here is my vb.net code:
Public Interface IFlukeComm
Function GetReading(ByVal Command As String, ByVal PortNum As Integer) As String

[code].....

View 1 Replies

Convert Delphi's System.Copy To .net?

Jan 3, 2012

This is the Delphi code I'm trying to convert to .net:

s1 := Copy ( s1 , 1,x - 1) + Copy(s1, x + 1,Length(s1));

I tried:

s1 = s1.Substring(x - 1, 1) + s1.Substring(s1.Length, x + 1)

But I get error's when the index is out of range. in Delphi it works fine.

Added one line to convert..
s2 := s2 + chr(3);

View 1 Replies

Convert Old Delphi Code To VB 2010

Apr 15, 2012

I have an old program from 2002, which was coded in Delphi 7. Now i would like to rewrite the whole program, and expand in Visual Basic. how to convert my old code to VB2010? The code is very simple. I fill a database with Comboboxes and TextBoxes .Text. [Code]

View 2 Replies

Delphi To VB: Define Data Types?

Aug 11, 2011

in Delphi I have:

type osVer = (
osVerUnknown,
osVerWin95,

[code]....

I need to translate to VB...

View 3 Replies

Equivalent Of Delphi's Application.processmessages

May 31, 2009

In Delphi when we needed to allow the system to finish painting an object or something like that we could add a processmessages that would then let the system finish what it was doing before going on with the code.This was always handy when we wanted to show a message like "Please wait"before the start of a lengthy process.So then. What is the equivalent way of doing this in VB.

View 1 Replies

Migrate Delphi 2007 Component To .NET?

Jul 12, 2010

I have generated a component in Delphi 2007 Code Gear and I need to migrate it to .NET to be used by VB.NET platform.I generated an ActiveX dll but I have been told that only the declaration of the class is visible in .NET.Actually the component I have generated is inherited by another component of which I have only the .dcu files. My new component is exactly similar as the parent one except from that I have overridden the constructor create.I wonder why the .NET, although it accepted the component, it did not provide the inherited properties, methods etc.

View 1 Replies

.net - Send Text From VB To Delphi Apps Using SendMessage?

Apr 5, 2011

) I am trying to send a short text from a VB app to Delphi app.. here is the VB Code: Sender Program "Sender"

Public Class SendData
Const WM_COPYDATA = &H4A
Public Structure CopyDataStruct

[code]....

It is possible to send strings from VB to Delphi programs using WM_COPYDATA command, and SendMessage function?

View 1 Replies

Comparison Level How Does .NET Stack Up Against Delphi For Web Application?

Feb 8, 2011

I was surfing the next to get some of the powerful elements that .NET has over other langauges when it comes to VB.NET and I was told to learn delphi.

Since this is a VB.NET forum I was hoping you guys could tell me why I should stick with VB.NET over a language like delphi.

View 6 Replies

VS 2010 - USB Reader Device - Convert Delphi Code

Nov 21, 2010

I am working on Some USB reader device..i got only delphi 7.0 example code...i can able to understand some code remaining cant so below is that code.

function ReadCard(fUSB:Byte;Buffer:PChar):Integer; stdcall;
external 'proRFL.DLL';
function GetDLLVersion(sDllVer:PChar):Integer; stdcall;
external 'proRFL.DLL';

[CODE]...

View 7 Replies

Converting File Into Bytes And Then Converting Those Files Back Into Its Original Form?

Aug 22, 2011

my goal is to

1.Take an file(exe,dll,etc)

2.Convert it into hex

3.place that hex values in a stack

4.Execute the values inside the stack to its original form(i.e. take the elements out of stack and then convert it to a compile format)

Imports System.IO
Sub Main()
Dim fileName As String = "ABC.exe"

[code]....

View 1 Replies

.net - STL Like Stuff In VB?

Dec 4, 2011

Is there anything like STL in Visual Basic , e.g a binary tree , quick sort Do I have to implement those algorithms myself , does Microsoft provide any useful interface ?

View 1 Replies

Declare Stuff At Once?

Sep 23, 2008

i am making a program and the program runs too slow, so i would like to declare my functions at once.. not like this :

[Code]...

View 6 Replies

Use MS's VB Express And Stuff?

Jan 17, 2010

I've been looking for some programming languages, and I've read about the basics of Python and C++, but I'm more interested in Visual Basic But! Everywhere I look, I only find tutorials about how to use MS's Visual Basic Express and stuff, not how to code, not tutorials about the code syntax, how to declare variables and these essential things.Does anyone here has a good tip about learning the basics of VB? And not how to use VB Express/Full edition I can insert a new button but I have no idea on how to make it work, what's the point of it?

EDIT: Oh and another thing.I was playing around VB, creating a simple user interface with buttons, and I've noticed that the code doesn't change when I update the button's or other objects' Name property in the Designer window... shouldn't the code update itself with the new objects names?

View 6 Replies

Ut The Stuff Into The Hashtables?

Jul 25, 2009

i have a hashtables working with a simple dictionary, my problem is i put the stuff into the hashtables but i cant extract the key... i need the key so i can remove stuff from it using the code..

View 11 Replies

Add Stuff Form One Combo Box To Another?

May 11, 2011

i am working on a project! the problem i am having is that i have two combo box first combo box takes stuff form the file and then add it to listfile it also removes that selected file from the combo box.suppose i have four carid in my combo box...when i select one car and then send it to dispatch it removes form tht combo box and add it to the lst file... this much i can do. is i need that carid that removes from the combo box should add in another combo box ... but i cant able to do it

Public Class MainForm
Private strCarID() As String
Private strTime As DateTime
Private strDate As DateTime

[code]....

View 27 Replies

Add Stuff To The Existing Tables?

Sep 10, 2009

I am making kind of like a login form, except a little more complicated. Right now I have an SQL Database that stores the login information. My question is, how do I add stuff to the existing tables? Like How would I have it so an admin can type in a new login and a new password, and have it so the form stores it in one of my tables in the database?

View 11 Replies

Cannot Display Any Stuff On ListBox?

Feb 1, 2012

I can't get anything to display on the list box that I created named "depreciationListBox" I have been working on this project for a while and I am quite stumped.

Private Sub displayButton_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles displayButton.Click
Dim cost As Double
Dim life As Double = CDbl(lifeListBox.SelectedItem)
Dim period As Double
[Code] .....
[URL]

View 2 Replies

Delete Stuff At Runtime?

Jun 30, 2010

Adding it there but if i load i it loads it all

View 8 Replies

Drop Down Box And Other Stuff In ASP.NET With (VS 2008)

Apr 13, 2010

I am trying to polish up a program a program that I have converted from a Windows Form in to an ASP.NET Web Application. I have several questions:

1.) I have a drop down box where users can select their variables, but users can also enter their variables manually into various text fields. What I want is for the drop down box to show a string like "Choose Variables" when ever the user enters their variables manually. I want this to happen without having to reload the page.

2.) In the Windows Form version of this application I had a RichTextBox that populated with data (line by line) after a calculation was made. I used "AppendText" in my Windows Form, but that is not available in ASP.NET, and neither is the RichTextBox. I tried to use just a text box but that isn't working right.

[Code]...

View 3 Replies

Get Rid Of All Microsoft.VisualBasic Stuff?

Nov 6, 2010

I am almost done cleaning the code. It is a huge project and I only have 35 errors left. I have opened a new thread as this is no longer only about IsNumeric. All errors relate to the following Microsoft.VisualBasic keywords:

InStrRev
InStr
Mid
DateDiff <=== solved date.Subtract(otherDate)

[code]....

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved