oxygene

How can I pass a Delphi string to a Prism DLL?

 ̄綄美尐妖づ 提交于 2019-12-28 06:24:17
问题 We try to pass a string from a native Delphi program to a Delphi Prism DLL. We have no problem passing integers, but strings are mismatched in the DLL. We saw Robert Love's code snippet in response to another question, but there is no code for the native Delphi program. How can we pass strings from Delphi to a Delphi Prism DLL? 回答1: The best way would be to use WideString. For several reasons. It is Unicode and works before D2009 It's memory is managed in ole32.dll, so no dependency on either

Are there cross-compilable OpenGL examples made with Oxygene?

爱⌒轻易说出口 提交于 2019-12-23 22:32:32
问题 We have a working OpenGL project made for PC (works on MacOS and Linux under Wine as well) which we want to try to cross-compile to tablets. Delphi XE2/XE4 offers iOS support, but there's no Android yet and judging from iOS implementation history it might take 1-2 years. Now we start looking into other possibilities which will allow us to keep the majority of Pascal codebase (80k lines). So here's the question for the Oxygene: Are there any examples of OpenGL applications made with Oxygene

Replacement for TStringList in Delphi Prism.

天大地大妈咪最大 提交于 2019-12-12 11:23:35
问题 I am migrating an application written in Delphi 2007 .Net to Delphi Prism, which is the best option to replace the TStringList and TStrings class? Thanks in advance. Bye. 回答1: Just use the built in List types in the .NET framework, or the StringCollection. The easiest are the generic lists: List<String> But StringCollection has a few bits that the List does not have; you can read a bit about that in this thread. The advantage of using built-in .NET Framework classes, is that there is plenty

Why timer (system.windows.forms.timer) won't start?

限于喜欢 提交于 2019-12-12 04:43:14
问题 Within a user-defined class, I have a timer and it just won't start when I Timer.Enabled. User-Defined Class: TSerialIndicator = public class private method TxTimerEvent(Sender:System.Object; e:System.EventArgs); public Txlight:Label; Txtimer:System.Windows.Forms.Timer; constructor(mform:Form); method Transmit; method Receive; end; Here is the constructor: constructor TSerialIndicator(mform:Form); begin TxLight := new Label; TxLight.AutoSize := false; TxLight.BorderStyle := BorderStyle

How to call function CreateProcess in Delphi Prism?

为君一笑 提交于 2019-12-12 01:29:53
问题 I wrote function CreateProcess( lpApplicationName:String; lpCommandLine:String; lpProcessAttributes:IntPtr; lpThreadAttributes:IntPtr; bInheritHandles:Boolean; dwCreationFlags:Int32; lpEnvironment:IntPtr; lpCurrentDirectory:IntPtr; lpStartupInfo:STARTUPINFO; lpProcessInformation:ProcessInfo):Boolean; external 'kernel32.dll'; but VStudio said "Semicolon" expected - after external and " "end" expected" after 'kernel32.dll'; Can you help me to load and call a function please? 回答1: Why don't you

Delphi Prism getting Unknown Identifier “DllImport” error

匆匆过客 提交于 2019-12-10 11:44:35
问题 I'm trying to call Window's SendMessage method in Delphi Prism, I've declared the class as follow: type MyUtils = public static class private [DllImport("user32.dll", CharSet := CharSet.Auto)] method SendMessage(hWnd:IntPtr; Msg:UInt32; wParam:IntPtr; lParam:IntPtr):IntPtr; external; protected public end; When I tried to compile, I get the error Unknown identifier "DllImport" I used this as an example, How to call function CreateProcess in Delphi Prism? and the syntax looks the same. Is there

Good Delphi Prism online resources

纵饮孤独 提交于 2019-12-07 05:34:35
问题 A Google search on "delphi prism", "delphi prism resources" or "delphi prism code snippets" reveal almost no good sites at all are there any good programming site(s) with some good amount of code snippets and tutorials on Delphi Prism? Thanks in advance! 回答1: @omair, you have you have basically five ways to obtain information about Delphi Prism 1) The official Info Prism Wiki Developing for Mono with Delphi Prism 2) Using the Blogs Introduction to Language Integrated Query with Delphi Prism:

Is Delphi Prism a new version of Delphi .net?

老子叫甜甜 提交于 2019-12-07 04:44:11
问题 First of all (before this question get down voted): I am a developer developing 99,99% of my programs using Delphi targeting Win32 (developing in Delphi 7 still, very slowly migrating to Delphi 2010). When Delphi 2006 or 2007 (can't remember which version at the moment) came out I bought the RAD Studio edition to be able to start developing .net applications using Delphi.net and VCL.net. I played around with it for some short time, but in the end, due to work load just kept using Delphi 7 as

Delphi Prism getting Unknown Identifier “DllImport” error

元气小坏坏 提交于 2019-12-06 18:49:24
I'm trying to call Window's SendMessage method in Delphi Prism, I've declared the class as follow: type MyUtils = public static class private [DllImport("user32.dll", CharSet := CharSet.Auto)] method SendMessage(hWnd:IntPtr; Msg:UInt32; wParam:IntPtr; lParam:IntPtr):IntPtr; external; protected public end; When I tried to compile, I get the error Unknown identifier "DllImport" I used this as an example, How to call function CreateProcess in Delphi Prism? and the syntax looks the same. Is there a setting I need to enable, or do I have a syntax error? 500 - Internal Server Error Make sure you

Good Delphi Prism online resources

六眼飞鱼酱① 提交于 2019-12-05 12:06:18
A Google search on "delphi prism", "delphi prism resources" or "delphi prism code snippets" reveal almost no good sites at all are there any good programming site(s) with some good amount of code snippets and tutorials on Delphi Prism? Thanks in advance! @omair, you have you have basically five ways to obtain information about Delphi Prism 1) The official Info Prism Wiki Developing for Mono with Delphi Prism 2) Using the Blogs Introduction to Language Integrated Query with Delphi Prism: Part 1 Introduction to Language Integrated Query with Delphi Prism, Part 2 Using LINQ to Objetcs in Delphi