How to porting such Delphi 7 code into .net?
Such as, EnterCriticalSection(),LeaveCriticalSection(),
InitializeCriticalSection(); etc.
Thanks a lot.
Regards,
Chunfu
> How to porting such Delphi 7 code into .net?
> Such as, EnterCriticalSection(),LeaveCriticalSection(),
> InitializeCriticalSection(); etc.
You probably want to use an instance of System.Threading.Monitor, if
this is not exactly what you want there are several other options in
the System.Threading namespace.
--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
Where can I find all the porting Delphi7 to Delphi 2005 .Net information?
I encountered another type: PWOHandleArray , How porting this?
Regards,
Chunfu.
"Marc Rohloff [TeamB]" <"on request"> wrote in message
news:z1yoe6v3...@marcrohloff.com...
> Where can I find all the porting Delphi7 to Delphi 2005 .Net information?
Here is a good start.
> I encountered another type: PWOHandleArray , How porting this?
I have never heard of this. Is it a Delphi class?
Actually what I want is to porting a lot of existing Delphi 7 code to
Compact Framework in Delphi 2005.
My first step is porting it to VCL.Net. After comments a lot of code, I can
compile it in VCL.Net now.
Now I try to porting it to CF.Net. I find there are even not Windows,
System, SysUtils etc "System" units i can use
in CF.Net. The existing code replys extensively on these units, what should
i do now? Need to use pure CF.Net only
in Delphi 2005? If so maybe stratch with C# in VisualStudio is better.
I also post this in dotnetPreview group. I am just feels very frustrated
when doing this, so forgive this double-posting.
Thanks.
"Marc Rohloff [TeamB]" <"on request"> wrote in message
news:iiw3yvc2...@marcrohloff.com...
> I also post this in dotnetPreview group. I am just feels very frustrated
> when doing this, so forgive this double-posting.
As much as I understand your frustration please don't cross-post it si
against the newsgroup regulations.
> Actually what I want is to porting a lot of existing Delphi 7 code to
> Compact Framework in Delphi 2005.
> My first step is porting it to VCL.Net. After comments a lot of code, I can
> compile it in VCL.Net now.
> Now I try to porting it to CF.Net. I find there are even not Windows,
> System, SysUtils etc "System" units i can use
> in CF.Net. The existing code replys extensively on these units, what should
> i do now? Need to use pure CF.Net only
> in Delphi 2005? If so maybe stratch with C# in VisualStudio is better.
You will also discover that a lot of the .Net framework classes lack key
properties and methods in the Compact Framework, or that the .Net
framework classes simply lack the feature that you need even inn the
full framework.
An example: the .Net Event class can not create Named Events, so you
have to implement a descendent of WaitHandle that implements a named
event if you need that functionality.
Then when you port to the CF you discover that the CF WaitHandle
implementation lacks key properties/methods that prevent your NamedEvent
class form compiling etc...
Have a look at OpenNetCf.org for more info
(http://www.opennetcf.org/CategoryView.aspx?category=Home).
Note that I am talking of my experience with C# in VS.Net here, not Delphi.
Danny
---