Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-06

Windows Phone 8 + pascal

13 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Juha Manninen

*In a CNN news page

http://edition.cnn.com/2012/06/20/tech/mobile/windows-phone-8-microsoft/index.html I found* that Windows Phone 8 will support native C code. That means it will support also native pascal code.
Does anyone know how is it done in practice? Is the old WinAPI brought back?

Juha
*

------------------------------------------
**Shared Native Code*

Windows Phone 8 will share native C and C++ code with Windows 8, making it easier for developers to create apps for both platforms. It's not something that consumers will immediately notice when they use the OS, but Microsoft hopes shared native code will lead to better, faster app development — and thus more quality apps in Windows Phone Marketplace.

"The biggest effect this will have is we're going to see some freaking killer games this year," Belfiore said.

At its developer summit, Microsoft continually hammered on how easy it will be for developers to port games from Windows 8 to Windows Phone 8, and vice versa. "Suddenly, with Windows Phone 8 with that shared core, taking an app from the PC to phone is very straightforward," Belfiore said.

In essence, native code will enable developers to write high-performance code — which is why games are such a big deal — and drive hardware acceleration. "You're going to see some beefy, powerful phones running some amazing games this year," Belfiore said.

Reply by email

Juha Manninen
to Sven Barth
Sven Barth wrote
I believe they'll mostly go through the WinRT, which is Microsoft's new API pet project.

Thanks. I didn't even know about this WinRT. New technologies are appearing all the time.

Page http://en.wikipedia.org/wiki/Windows_RunTime
says that WinRT is a
COM<http://en.wikipedia.org/wiki/Component_Object_Model>-based API and uses a .NET-like metadata format.
So it is not native code after all then. I don't know why they advertised it as native. I guess it is faster than .NET code because it is not managed. I thought that .NET allows non-managed code, too.

Anyway, I believe Windows Phone will attract both developers and users in future. It is a rather good environment for programming. Things are not completely hopeless for Nokia and other Windows Phone makers (maybe).

Juha

Reply by email

Ludo Brands
to Juha Manninen
Show quoted text 7 lines
Page http://en.wikipedia.org/wiki/Windows_RunTime says that WinRT is a COM-based API and uses a .NET-like metadata format. So it is not native code after all then. I don't know why they advertised it as native. I guess it is faster than .NET code because it is not managed. I thought that .NET allows non-managed code, too.

There is a subset of the winapi that is available for metro applications: http://msdn.microsoft.com/en-us/library/windows/apps/br205757.aspx. In the Graphics area you'll find a lot of drawing functions and d2d,d3d support which is porbably what the game developpers are interested in. Note that C is not an offically supported language anymore (C++ is). A lot of the available winapi interfaces are handling com interfaces. Most system api's used in the fpc rtl are gone in favor of the new ones introduced in win7 or win8. So, yes, you can develop "native" metro apps that run on win8 desktop and win8 phone but not by using the old winapi functions.

Ludo

Reply by email

Sven Barth
to Juha Manninen: Thanks. I didn't even know about this WinRT. New technologies are appearing all the time.…
"Juha Manninen" wrote
On Sun, Jun 24, 2012 at 8:57 PM, Sven Barth
> > I believe they'll mostly go through the WinRT, which is Microsoft's new

API pet project.

Thanks. I didn't even know about this WinRT. New technologies are

appearing all the time.

Page http://en.wikipedia.org/wiki/Windows_RunTime says that WinRT is a COM-based API and uses a .NET-like metadata format. So it is not native code after all then. I don't know why they advertised

it as native. I guess it is faster than .NET code because it is not managed. I thought that .NET allows non-managed code, too.

Why does "COM-based + .NET-like metadata" imply that it's not native code? The core libraries are written in either C or C++ and the metadata is needed so that runtimes like .NET and languages like JavaScript can interface with WinRT. We can also use this metadata to generate Object Pascal wrappers (it is basically the successor of IDL which was used for interface definitions in the original COM)

Regards,
Sven

Reply by email

Unknown author
to Sven Barth
Sven Barth wrote 24 lines
Am 24.06.2012 22:59 schrieb "Juha Manninen" : > > On Sun, Jun 24, 2012 at 8:57 PM, Sven Barth wrote: >> >> I believe they'll mostly go through the WinRT, which is Microsoft's new API pet project. > > > Thanks. I didn't even know about this WinRT. New technologies are appearing all the time. > > Page http://en.wikipedia.org/wiki/Windows_RunTime > says that WinRT is a COM-based API and uses a .NET-like metadata format. > So it is not native code after all then. I don't know why they advertised it as native. I guess it is faster than .NET code because it is not managed. I thought that .NET allows non-managed code, too. Why does "COM-based + .NET-like metadata" imply that it's not native code? The core libraries are written in either C or C++ and the metadata is needed so that runtimes like .NET and languages like JavaScript can interface with WinRT. We can also use this metadata to generate Object Pascal wrappers (it is basically the successor of IDL which was used for interface definitions in the original COM)

Well, now we know what you will do during your holidays ;-)

I can't believe they invented yet another technology/API. Their partners must go crazy :/

Michael.

Reply by email

Marco van de Voort
to Sven Barth: API pet project. appearing all the time. it as native. I guess it is faster than .NET…

In our previous episode, Sven Barth said:

Show quoted text 6 lines
> says that WinRT is a COM-based API and uses a .NET-like metadata format. > So it is not native code after all then. I don't know why they advertised it as native. I guess it is faster than .NET code because it is not managed. I thought that .NET allows non-managed code, too. Why does "COM-based + .NET-like metadata" imply that it's not native code?

It is ambiguous. Some COM forms can be queried for their methods etc, but in some cases straight interface use is also possible.

But my guess is that it is like DirectX, import the typelib, generate the interface units for it, and go.

The core libraries are written in either C or C++ and the metadata is needed so that runtimes like .NET and languages like JavaScript can interface with WinRT.

Usually scripting and non scripting interfaces are separate. (since they derive from different base interfaces)

We can also use this metadata to generate Object Pascal wrappers (it is basically the successor of IDL which was used for interface definitions in the original COM)

A typelib importer is already in svn.

Reply by email

Sven Barth
to Unknown author: Well, now we know what you will do during your holidays ;-) I can't believe they invented…
Show quoted text 28 lines
On Mon, 25 Jun 2012, Sven Barth wrote: > Am 24.06.2012 22:59 schrieb "Juha Manninen" : >> >> >> On Sun, Jun 24, 2012 at 8:57 PM, Sven Barth < > > wrote: >>> >>> >>> I believe they'll mostly go through the WinRT, which is Microsoft's new > > API pet project. >> >> >> >> Thanks. I didn't even know about this WinRT. New technologies are > > appearing all the time. >> >> >> Page http://en.wikipedia.org/wiki/Windows_RunTime >> says that WinRT is a COM-based API and uses a .NET-like metadata format. >> So it is not native code after all then. I don't know why they

advertised

Show quoted text 5 lines
> > it as native. I guess it is faster than .NET code because it is not > managed. I thought that .NET allows non-managed code, too. > > Why does "COM-based + .NET-like metadata" imply that it's not native

code?

Show quoted text 8 lines
> The core libraries are written in either C or C++ and the metadata is > needed so that runtimes like .NET and languages like JavaScript can > interface with WinRT. We can also use this metadata to generate Object > Pascal wrappers (it is basically the successor of IDL which was used for > interface definitions in the original COM) Well, now we know what you will do during your holidays ;-)

Ehm... no, not really. I see no reason in working on something that I don't plan to use. ;)

I can't believe they invented yet another technology/API. Their partners

must go crazy :/

They have seen that their pure managed approach on Windows Phone 7 wasn't as successful as thought and now they try to attract native, managed and "web" (JavaScript) developers...

Regards,
Sven

Reply by email

Sven Barth
to Marco van de Voort: In our previous episode, Sven Barth said: It is ambiguous. Some COM forms can be queried…
"Marco van de Voort" wrote
In our previous episode, Sven Barth said: > > says that WinRT is a COM-based API and uses a .NET-like metadata

format.

> > So it is not native code after all then. I don't know why they

advertised

> it as native. I guess it is faster than .NET code because it is not > managed. I thought that .NET allows non-managed code, too. > > Why does "COM-based + .NET-like metadata" imply that it's not native

code?

It is ambiguous. Some COM forms can be queried for their methods etc, but

in

Show quoted text 5 lines
some cases straight interface use is also possible. But my guess is that it is like DirectX, import the typelib, generate the interface units for it, and go.

More or less yes, but that what we currently extract from the typelib will then be needed to be extracted from the metadata files.

Show quoted text 6 lines
> The core libraries are written in either C or C++ and the metadata is > needed so that runtimes like .NET and languages like JavaScript can > interface with WinRT. Usually scripting and non scripting interfaces are separate. (since they derive from different base interfaces)

That's the point where WinRT tries to be strong: You only need the library and the metadata to use it from within native or .NET languages or from within JavaScript (which is provided by an engine that can make use if WinRT kind and metadata)

> We can also use this metadata to generate Object Pascal wrappers (it is > basically the successor of IDL which was used for interface definitions

in

> the original COM) A typelib importer is already in svn.

Which won't be of much use for WinRT as this metadata is based on the metadata that .NET assemblies already use and not on IDL.

Regards,
Sven

Reply by email

Unknown author
to Sven Barth: advertised code? Ehm... no, not really. I see no reason in working on something that I…
Sven Barth wrote 16 lines
>> it as native. I guess it is faster than .NET code because it is not >> managed. I thought that .NET allows non-managed code, too. >> >> Why does "COM-based + .NET-like metadata" imply that it's not native code? >> The core libraries are written in either C or C++ and the metadata is >> needed so that runtimes like .NET and languages like JavaScript can >> interface with WinRT. We can also use this metadata to generate Object >> Pascal wrappers (it is basically the successor of IDL which was used for >> interface definitions in the original COM) > > > Well, now we know what you will do during your holidays ;-) Ehm... no, not really. I see no reason in working on something that I don't plan to use. ;)

I was not being serious. But it does seem something up your alley.

Show quoted text 7 lines
> I can't believe they invented yet another technology/API. Their partners must go crazy :/ They have seen that their pure managed approach on Windows Phone 7 wasn't as successful as thought and now they try to attract native, managed and "web" (JavaScript) developers...

Could be. The end result is that they have now several technologies, and the new developer is faced with the choice: which one ? if you're in it for the long term, this is a crucial decision.

Michael.

Reply by email

Ludo Brands
to Sven Barth: format. advertised code? in More or less yes, but that what we currently extract from the…
Show quoted text 6 lines
> > A typelib importer is already in svn. Which won't be of much use for WinRT as this metadata is based on the metadata that .NET assemblies already use and not on IDL. From .net assemblies a TLB type library can be extracted with the regasm or

tlbexp .net tools. The typelib importer reads TLB. The .net assembly needs to be written with COM in mind, else not much will be exposed. But I assume MS was not that stupid to block the COM route in WinRT ;)

Ludo

Reply by email

Sven Barth
to Unknown author: I was not being serious. But it does seem something up your alley. Could be. The end…
Show quoted text 25 lines
On Mon, 25 Jun 2012, Sven Barth wrote: >>> it as native. I guess it is faster than .NET code because it is not >>> managed. I thought that .NET allows non-managed code, too. >>> >>> Why does "COM-based + .NET-like metadata" imply that it's not native > code? >>> The core libraries are written in either C or C++ and the metadata is >>> needed so that runtimes like .NET and languages like JavaScript can >>> interface with WinRT. We can also use this metadata to generate Object >>> Pascal wrappers (it is basically the successor of IDL which was used >>> for >>> interface definitions in the original COM) >> >> >> Well, now we know what you will do during your holidays ;-) > > Ehm... no, not really. I see no reason in working on something that I > don't > plan to use. ;) I was not being serious. But it does seem something up your alley.

I knew that... that's why there is a ";)" at the end ^^

Show quoted text 12 lines
> >> I can't believe they invented yet another technology/API. Their partners > must go crazy :/ > > They have seen that their pure managed approach on Windows Phone 7 wasn't > as successful as thought and now they try to attract native, managed and > "web" (JavaScript) developers... Could be. The end result is that they have now several technologies, and the new developer is faced with the choice: which one ? if you're in it for the long term, this is a crucial decision.

We'll see how Windows (Phone) 8 gets off if at all... until then I concentrate on what's going on with ReactOS where someone is currently working on getting that OS' experimental ARM port to boot on an iPhone :)

Regards,
Sven

Reply by email

waldo kitty
to Unknown author: Well, now we know what you will do during your holidays ;-) I can't believe they invented…
Show quoted text 12 lines
On Mon, 25 Jun 2012, Sven Barth wrote: > Why does "COM-based + .NET-like metadata" imply that it's not native code? > The core libraries are written in either C or C++ and the metadata is > needed so that runtimes like .NET and languages like JavaScript can > interface with WinRT. We can also use this metadata to generate Object > Pascal wrappers (it is basically the successor of IDL which was used for > interface definitions in the original COM) Well, now we know what you will do during your holidays ;-) I can't believe they invented yet another technology/API. Their partners must go crazy :/

they still have "partners"? or is that just a different name for something else? :P :lol:

Reply by email