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)); 10 3172
I thought Borland was bringing out Delphi.net -and if so wouldnt it be
better to retain your code base int delphi and move them across into
delphi.net?
--
--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Arda Han" <ar**@han.com > wrote in message
news:u6******** ******@tk2msftn gp13.phx.gbl... 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)); I thought Borland was bringing out Delphi.net -and if so wouldnt it be better to retain your code base int delphi and move them across into delphi.net?
No it wouldn't (sadly said by a die hard delphi fan since version 1)
Its too buggy and unworkable for commercial use. Borland have issued a very
unfinished product this time.
Don't waste your pennies on Delphi, go c#. The 2 products are now so
similar in concept it's worth the move over for those people who are able to
pick and choose. I can't see D surviving for much longer.
C# is better for your CV too, lots of jobs there at the moment and not so
many for Delphi.
Claire wrote: I thought Borland was bringing out Delphi.net -and if so wouldnt it be better to retain your code base int delphi and move them across into delphi.net? No it wouldn't (sadly said by a die hard delphi fan since version 1) Its too buggy and unworkable for commercial use. Borland have issued a very unfinished product this time.
I haven't tried D8, personally, but I've heard other people say this too.
Just out of curiosity, have you tried D8 with the two (IIRC) patches
applied? Allegedly this makes it much more stable.
Don't waste your pennies on Delphi, go c#. The 2 products are now so similar in concept it's worth the move over for those people who are able to pick and choose. I can't see D surviving for much longer. C# is better for your CV too, lots of jobs there at the moment and not so many for Delphi.
That is a real shame. I bought Delphi 1 too with my hard earned
pennies -although I never really spent enough time with it I thought it was
a great product (version 5 was pretty good too).
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++.
--
--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"C# Learner" <cs****@learner .here> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. .. Claire wrote:
I thought Borland was bringing out Delphi.net -and if so wouldnt it be better to retain your code base int delphi and move them across into delphi.net?
No it wouldn't (sadly said by a die hard delphi fan since version 1) Its too buggy and unworkable for commercial use. Borland have issued a
very unfinished product this time.
I haven't tried D8, personally, but I've heard other people say this too.
Just out of curiosity, have you tried D8 with the two (IIRC) patches applied? Allegedly this makes it much more stable.
Don't waste your pennies on Delphi, go c#. The 2 products are now so similar in concept it's worth the move over for those people who are
able to pick and choose. I can't see D surviving for much longer. C# is better for your CV too, lots of jobs there at the moment and not
so many for Delphi.
Mark Broadbent wrote: That is a real shame. I bought Delphi 1 too with my hard earned pennies -although I never really spent enough time with it I thought it was a great product (version 5 was pretty good too).
Myself, I've used several versions of Delphi, with the latest being
version 7. It's a great language/framework and the Win32 version is a
very attractive alternative to (V)C++/MFC, IMO.
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
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
Thanks friends for answer my question !
Delphi.Net ? It is calling now "Bug Hell". I want write about me why I want
change my software skill to C#.
Because MS oriented software industry. Why I use other languages. I agree
Delphi is powerfully language and now I am wining my salary from Delphi. But
it is using new technologies a few months (least 6 month or 1 year) later.
In this way I want change my skill to C# (Because my first language is C and
I hate VB)
Anybody know answer of my question?
Thanks
"Claire" <bl****@blahhhh h.com>, haber iletisinde şunları
yazdı:uD******* ******@TK2MSFTN GP09.phx.gbl... I thought Borland was bringing out Delphi.net -and if so wouldnt it be better to retain your code base int delphi and move them across into delphi.net? No it wouldn't (sadly said by a die hard delphi fan since version 1) Its too buggy and unworkable for commercial use. Borland have issued a
very unfinished product this time. Don't waste your pennies on Delphi, go c#. The 2 products are now so similar in concept it's worth the move over for those people who are able
to pick and choose. I can't see D surviving for much longer. C# is better for your CV too, lots of jobs there at the moment and not so many for Delphi.
>No it wouldn't (sadly said by a die hard delphi fan since version 1) Its too buggy and unworkable for commercial use. Borland have issued a very unfinished product this time.
Can't confirm that at all - Delphi 8 (with update 2 installed) works
fine for me.
Don't waste your pennies on Delphi, go c#. The 2 products are now so similar in concept it's worth the move over for those people who are able to pick and choose. I can't see D surviving for much longer.
Well, Turbo Pascal's and Delphi's death have been annouced ever since
the product's been on the market, and it's still here and going strong
- don't waste YOUR pennies betting on Delphi's demise!
And yes, C# and Delphi are very similar - actually, Delphites have had
most of the great new .NET features like a great framework and
productivity ever since the product came out in Feb 1995 :-) The rest
of the programming world has finally woken up to that "new paradigm"
now ;-)
C# is better for your CV too, lots of jobs there at the moment and not so many for Delphi.
Depends - plus, what good are TONS of jobs, I only need ONE - thank
you! Again - the number of Delphi jobs has always been earmarked as
being very slim - I've managed to hold on to several over the years,
no problem. Don't let public perception fool you, and don't be a fool
yourself and foster that (inaccurate) public perception even
further....
Marc
=============== =============== =============== =============== ====
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)i nova.ch
Jon Skeet [C# MVP] wrote: C# Learner <cs****@learner .here> wrote:
IIRC (from reading his web site), Jon Skeet's in Cambridge. Maybe he could hook you up? :-P Nah - I *was* in Cambridge.
Ah, okay.
I don't know of many C# jobs either - I'm just happy to be in one :)
Kewl :-)
(I'd be happy in another Java job, too...)
Yeah, I'd be content with any programming job that doesn't involve using
a framework like MFC or a language like Fortran ;-) 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: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |