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


ADVERTISEMENT

Communicating With C++ Win32 Application?

Aug 20, 2009

Alright today im going to make a chat program in C++ and VB.net VB.net will be the server and C++ will be the chat room. Im doing this becuase some people dont have .net and the program fails so im trying this so then everyone can use it. How would i do this? Like C++ sending information to VB.net and printing it out on a textbox

View 2 Replies

VB In A Laptop Through USB Port And A USB-RS232 Converter To Communicate With A Microprocessor Using RS232 Protocol

Oct 18, 2010

I have developed a microprocessor based devise. It can communicate with laptop through RS232 as a VB application. Now most of laptops have USB port only. So I want to use USB replacing RS232 port on laptop side but not change anything on the device side. Can I do this using a USB-RS232 converter? How to change the VB software?

View 1 Replies

WIN32 EXCEPTION LINE* Keeps Running Into An Error(Win32 Exception Was Unhandled; Access Is Denied)?

Apr 18, 2012

I was scripting a very basic process manager, with a ListView component, and it was working fine for many days, up until now.Here is the code for getting processes:

Dim Process As New Process()
Dim Count As Integer = 0
ListView1.Items.Clear()[code].....

The line of code where I put "*WIN32 EXCEPTION LINE* keeps running into an error(Win32 Exception was unhandled; Access is denied). Here is the full error description:

System.ComponentModel.Win32Exception was unhandled
ErrorCode=-2147467259
Message=Access is denied[code]....

As I said before, this had been working for several days, up until now.

View 1 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

C# - Communicating To Applications On LAN

Jan 3, 2011

I want to code an app with recreational purposes. This should be a Desktop app that detects itself running on other computers on the same LAN and communicates with them. By communication I mean that I should be able to pass anything from on to another. note that although I'm not asking for code (that would beat my purpose, of course) I think some small snippets wouldn't hurt. In any case what I really want is the "recommended procedure", I mean what Microsoft recommends for this environment, and documentation :)

View 3 Replies

Communicating With Printers?

Feb 3, 2009

is there a way through vb visual express 08 to ask a printer if it has toner or paper? im not to sure on how to communicate with printers in this way if it is at all possible.i am writing a program to display the status of the printer and this is key.

View 1 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

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

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

Asp.net - Communicating With Android C2DM Using .NET?

Mar 8, 2012

I've set up this function in my web app to send push notifications to Android devices:

Private Function SendNotification(ByVal authstring As String) As String
Dim request As WebRequest = WebRequest.Create("https://android.apis.google.com/c2dm/send")
request.Method = "POST"

[code]....

However, whenever I call this function, I get the following error message: The remote certificate is invalid according to the validation procedure."

View 1 Replies

Communicating Form.vb And UserControl.vb

Jul 25, 2009

I have VB.net Simple application with form1.vb , UserControl1.vb and a simple Dataset with few records included. In my UserControl1.vb I'll added a Bound DataGridView1 with Products Datasource. My question is.. How can i filter the Products table from UserControl1.vb? The Filter Value ("ProdID") is from Form1.vb with textbox1(receive the value.). here is my Form1 code

[Code]...

View 4 Replies

Communicating With Access Database?

Feb 15, 2011

Im new to using databases in my programming and to be honeest i am struggling.i need to get the program to communicate with my database to allow the user to login this is the code i have so far as i say i dont know much about it so its a bit bodged.

[Code]...

View 4 Replies

VS 2008 Communicating Between .NET Applications In The LAN?

Aug 8, 2011

I need to communicate between multiple applications (one server and multiple clients) in the LAN. While googling I came across 3 concepts (TCP/IP, Named Pipes and WCF). I also understand WCF needs lot of study for a starter like me. I need to have one (server) application running on one machine, the values generated by it should be displayed immediately on the other (client) application which will be running on multiple machines in a LAN. Also when the user pauses the process from the client application, it should pause the process on the server application.

View 2 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

Communicating Between Multiple Instances Of Application?

Mar 9, 2009

I have an application which the user can open multiple instances on the same machine. However, a section of the app would have sync problems if more than 1 instance has control over it. This is where I thought of transferring control, or sharing, between them. What should I be looking into?

They would have to be able to identify which one of them has control and to send text information over. I thought IPC or Named Pipes could do the trick, but I'm unfamiliar with them and examples seem to indicate only a single server will work. Here, I have multiple instances of the same app and every one of them needs to be able to listen for that request for control.

View 25 Replies

Communicating To A Device Using A USB To Serial Port (VCP)?

Feb 19, 2010

I am communicating to a device using a USB to serial port (VCP). I am having a problem with the usb failing. When the usb fails my app will lock up and the com port is lost. I have seen a post about this but cannot find it.

View 3 Replies

Communicating With Remote Host & Port?

Oct 1, 2009

I've been trying for a long time to do what seems to be the most simplest of things..I have a remote host and I need to know if certain posts on that host are open or closed.Many examples on the net that I have found arent complete, and because I havent worked with VB.net for long I dont knowhow to complete them.Here is my code:: The issue is with this it tell me the target port is always closed, when I know that it is open.Code:Dim host As String = "www.google.com" Dim port As Integer = 80 Dim addr As IPAddress =CType(Dns.GetHostAddresses(host)(0), IPAddress) Try Dim tcpList As New TcpListener(addr, port)tcpList.Start() Catch sx As SocketException MessageBox.Show("port is closed") End TryA friend of mine suggested using WinSock.. I've not dealt with it before so I don't know what he's on about.

View 2 Replies

Communicating With Sharepoint Site On Server?

Jan 10, 2011

I have a project in VB .net 2008 and would like to communicate with a Sharepoint site on our companies SP server. Is it possible to interact with the SP site such as:
Create sub-folder
Upload and download files
Change authority levels on folders

View 5 Replies

VS 2008 Communicating Between Mobile Device And Pc?

Sep 25, 2011

I am basically after some information on what you would believe to be the best way to send strings from a mobile device (possibly a windows mobile phone) to a PC and vise versa. Just so you know the distance could be upto 4 miles and no direct line of sight.

View 6 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

Code Conversion Tool For Converting Delphi

Nov 18, 2009

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

View 3 Replies







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