I am migrating my some applications from Delphi to C#. But...
Yes But I don't know C# professionally. I am using DLL in delphi like this :
.....
const
RFID_103_485IO = 'Cihaz.dll';
Function SearchPort (Prm1:LongWord) :LongWord; cdecl; External
RFID_103_485IO name 'SearchPort';
Function CheckPort (Prm1:LongWord) :LongWord; cdecl; External
RFID_103_485IO name 'CheckPort';
Function SearchReader (Prm1:LongWord; Prm2:LongWord) :LongWord; cdecl;
External RFID_103_485IO name 'SearchReader';
Function CheckReader (Prm1:LongWord; Prm2:LongWord) :LongWord; cdecl;
External RFID_103_485IO name 'CheckReader';
....
I am using it in Delphi :
.....
ResultNumber := CheckReader(n, m);
....
But how can I use my DLL functions in C#. I am trying below code in my
class. But it doesn't work. Could you help me ?
using System;
using System.Runtime. InteropServices ;
namespace MyDllLoadClass
{
public class Reader
{
[DllImport("Ciha z.dll", CallingConventi on=CallingConve ntion.Cdecl)]
static extern void SearchPort (uint Prm1);
[DllImport("Ciha z.dll", CallingConventi on=CallingConve ntion.Cdecl)]
static extern int CheckPort (uint Prm1);
[DllImport("Ciha z.dll", CallingConventi on=CallingConve ntion.Cdecl)]
static extern void SearchReader (uint Prm1, uint Prm2);
}
}
I am trying using this in my other class
label1.Text = Convert.ToStrin g(MyDllLoadClas s.Reader.CheckP ort(i));
Nov 16 '05
10 3175
oh dear doesn't sound good. Maybe I should leave IT and get myself a proper
career. I could one day aspire to getting my McDonalds 5 stars :D
Hopefully things will pick up, things seem to be improving but guess time
will tell.
--
--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote in message
news:MP******** *************** *@msnews.micros oft.com... C# Learner <cs****@learner .here> wrote: Where are all these C# jobs then? Im looking for something that can
expand my skills (hopefully with ado programming) but not expect me to be an
C# wizard. Im in UK cambridge but dont see too many jobs in C# mostly
C++. IIRC (from reading his web site), Jon Skeet's in Cambridge. Maybe he could hook you up? :-P
Nah - I *was* in Cambridge. I don't know of many C# jobs either - I'm just happy to be in one :) (I'd be happy in another Java job, too...)
-- Jon Skeet - <sk***@pobox.co m> http://www.pobox.com/~skeet If replying to the group, please do not mail me too This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Erva |
last post by:
Hi,
Is there someone who has moved from Delphi to VS.NET?
I'am using Delphi currently but seriously considering to moving VS.NET. I
would like to hear if someone has already done that, is it worth of it or
should i continue to ude Delphi for new projects. I'am developing mostly
desktop apps but in th future also ASP.NET apps.
-erva
|
by: Shai Levi |
last post by:
Hi,
I'm trying to migrate native c++ class to managed c++
class.
The native class header definition looks as:
class NativeClass
{
public:
typedef void (CbFunc1)(int n,void* p);
|
by: lukeharpin |
last post by:
Currently I have been developing applications in Delphi 7. Recently I
meet up with a friend of mine who previously developed in Delphi, from
version 1 - 7. When Delphi 8 .net was release he found too many bugs
and switch to C# and loves it. I hope to do the same. However, I have a
few hurdles to jump.
Firstly my boss is a Delphi nut. I have heard the guy who originally
developed Delphi worked on the development of C# ? If so this maybe...
|
by: Sanjay Kedare |
last post by:
Hi,
I am evaluating various alternatives of converting Delphi (Ver 4.0) screens
to C# screens. Are there any tools available for such conversion? if yes how
much conversion do they achieve? The number of screens to be converted are
huge, we are aiming minimum regression impact.
What could be the best approach?
Currently the option of Delphi.Net is ruled out.
|
by: lukeharpin |
last post by:
Hi World,
We have been developing Engineering software in Delphi 3,4,5,6,7 for a
few years now. This morning we had a discussion about OOP and
re-programming the software to which the question came up, should we
stay with Delphi and go with Delphi 2005 or not. I'm interested to
here everyone's opinion. Here were a few points raised. Is the
future .net and will every one have .net in 2 years time. Will Delphi
be around in 5 years time....
| |
by: BugHunter |
last post by:
Hello C/C++ Gurus,
Could someone give me a quick hint, how to make this piece of C code Borland Builder-worthy? Or just explain the meaning of this piece of code. I try to compile a cross-plattform application named JSBSim (jsbsim.sourceforge.net) with Borland Builder 6 and the compiler came up with following syntax intepretation problem:
const ENCODING *
NS(XmlGetUtf8InternalEncoding)(void)
{
return &ns(internal_utf8_encoding).enc;...
|
by: =?Utf-8?B?ZGF2ZWJ5dGhlc2Vh?= |
last post by:
Dear List,
We have a large application written in Delphi. I am writing a mobile app
written in .NET (C#) which reads and writes into the Delphi applications
Oracle database via a .NET Web Service. Much of the data centred
functionality on the application is quite involved, and to re-write all this
functionality in the .NET web service would be very time consuming. Our idea
is to perhaps develop a DLL written in Delphi, which copies...
|
by: gnuist006 |
last post by:
Is there a Delphi equivalent in the C world or Scheme/LISP world ?
Recently, Delphi is in resurgence. In Russia people are using like
crazy. For example, Bolega has written a free image processing program
scankromsator in delphi because its easy to write a gui. In arabia
people are using it also.
Also delphi, I heard delphi allows visual programming and delphi
programs run on:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |