Hi!
I try to integrate an external library into my vs2005 project while using the Windows Mobile 6 SDK. Of course, I added the additional directories and dependencies to the project settings, but I get some LNK2019 errors anyway.
So I created a dump of the *.lib files using "dumpbin.exe" and discovered that all function names start with a leading underscore. I found some precompiled parts of the library where there are no leading underscores in the function names and I can call them without any problems. But if I build those parts of the library on my own, there again are the LNK2019 errors and the "_functionname()" convention in the *.lib files.
Is there either a way to avoid those underscores when compiling the library or to call those function out of a windows mobile application?
Thanks in advance!
This looks a bit odd.
C++ decorates exported functions unless you add a def file to the project, but there is always way more garbage in the names.
What I don't understand is, why do you have a problem using a function that starts with an underscore?
Such names are perfectly acceptable in C / C++, in fact some C native functions like _wfopen start with an underscore.
What language are you programming in?
Also it might help find the solution, if you tell us what library you are using. Is it something available for download or your own creation?
Thanks for your quick reply.
I am working on a porting of the intel openCV computer vision library and I try to include it into a VS2005 C++ projekt created with the wizard for windows mobile 6.0 sdk for testing.
It seems that the problem appears when I switch the system to "/SUBSYSTEM:WINDOWSCE". Otherwise the library works perfectly.
New version V11 of C# IDE Mobile (MAJOR IMPROVEMENTS)
C# IDE Mobile is an application (totally free) that I've developed to be able to develop with C#/.NET2CF directly on the Pocket PC-Windows Mobile 5/6 (it doesn't require the .NET SDK, you don't need a desktop computer).
You can download the new version at:
http://www.geocities.com/hrowson/wm5_software/index.htm
or from my personal page:
http://www.geocities.com/hrowson/index.htm
MAJOR IMPROVEMENTS: This version includes a Windows Form Designer which greatly helps in creating your application's user interfaces. This designer is available in C# IDE Mobile via the menu "Tools/UserPlugin/ControlEditor" (and therefore works directly on the PPC). This greatly reduces the amount of written code for the application and allows getting a GUI very quickly (a few clicks)
This designer (free, like C# IDE Mobile) is developed by Jean and an introduction/presentation (although in French, but has some pictures to illustrate) is available here:
http://pagesperso-orange.fr/asnora/Control Editor/Control Editor.htm
This new version mainly adds the following improvements:
- Included new Windows Forms Designer (yes, you can a Windows Form designer usable directly on the PPC) developed by Jean (http://pagesperso-orange.fr/asnora/Control Editor/Control Editor.htm)
- Added support for compiled User Plugins (DLL instead of css)
- Added replacement File Dialog for smartphones on which the default .NET2CF FileDialog DLL is missing (this seems to be the case sometimes)
- Corrected issue with "Format document"
- Added support for user DLLs: You can now place your own CF DLLs (generated with Visual Studio for example) in the "UserDLLs" folder and call your functions within them (you can create your API for example in a native CF DLL and call these functions from your C# IDE Mobile code)
Harvey
Just some infos....
Hi,
In fact there's a translation on Jean's Web Site for the Form Designer and also I corrected a minor issue with the autatic code formatting (there was an ASSERT in there, but you just needed to say "ignore" to the debug dialog, so it doesn't really matter, the version is now V11b).
Harvey
Great tool! Thanks.
Microsoft assemblies
This is certainly a very interesting tool and probably will keep me happily busy!! But I seem to have a problem that I cannot find relative info: I'm trying to access the camera through the Microsoft.WindowsMobile.Forms.CameraCaptureDialog class, but the type cannon be resolved. I have verified that the appropriate GAC dll exists in the Windows directory. I cannot find the class/assembly in the MS.NETCF index either.
Any hints?
Thank you!
ps. I'm on a kaiser with CF 3.5 and Schap's WM6.1 Beta Rom.
nicely done sir
Hi,
Sorry, I've only just seen the post about Microsoft.WindowsMobile.Forms.CameraCaptureDialog. As I post on a few forums I don't always see answers that come a long time after the posts, that's why I leave my email easily accessible on the web site... don't worry about emailing me, I'm not planning on building a "spam" database...
I'll look quickly, there's also a similar problem with DataGrid it seems. I think these are both the same problem and should be sorted out quite easily.
Harvey
That's an app to help you lock screen and adjust volume with tiles. It calls functions in ShellChromeAPI.dll . Finally, it got published with English version.
link: http://www.windowsphone.com/en-us/store/app/quick-tiles/1725cca2-2349-4d33-b5d5-8b04e7810c04
(You may need to switch your phone language to English to download the English version. otherwise, the Chinese version will be shown. Forgive me for my tight schedule and I have to split different languages into different XAPs, for I only spent 2 hours developing this app...)
I've found two ways to pass the marketplace API detect, one is to use P/Invoke and the other is to load LoadLibraryExW without extern that from the lib provided by Microsoft.
both methods will be provided here in a month, and I may provide write some wrappers or static libraries.
Notice that I only found ways to access restricted API, but get higher privilege is not possible.
By this way, I think @GoodDayToDie 's HTTP Server with registry browser can be published with some simple modify. Even publishing the samsung interop unlock guide, which launches the toast using undocumented, is possible. Maybe we should try to find more useful functions which can be called without privilege in different dlls.
hjc4869 said:
That's an app to help you lock screen and adjust volume with tiles. It calls functions in ShellChromeAPI.dll . Finally, it got published with English version.
link: http://www.windowsphone.com/en-us/store/app/quick-tiles/1725cca2-2349-4d33-b5d5-8b04e7810c04
(You may need to switch your phone language to English to download the English version. otherwise, the Chinese version will be shown. Forgive me for my tight schedule and I have to split different languages into different XAPs, for I only spent 2 hours developing this app...)
I've found two ways to pass the marketplace API detect, one is to use P/Invoke and the other is to load LoadLibraryExW without extern that from the lib provided by Microsoft.
both methods will be provided here in a month, and I may provide write some wrappers or static libraries.
Notice that I only found ways to access restricted API, but get higher privilege is not possible.
By this way, I think @GoodDayToDie 's HTTP Server with registry browser can be published with some simple modify. Even publishing the samsung interop unlock guide, which launches the toast using undocumented, is possible. Maybe we should try to find more useful functions which can be called without privilege in different dlls.
Click to expand...
Click to collapse
What restricted API's possible to upload ?
ngame said:
What restricted API's possible to upload ?
Click to expand...
Click to collapse
you can load any API functions. but only some of them can be called and only a few is really useful.
I only tested the following functions
BOOL Shell_IsLocked()
void Shell_TurnScreenOn(BOOL)
void Shell_AdjustVolume(int)
hjc4869 said:
That's an app to help you lock screen and adjust volume with tiles. It calls functions in ShellChromeAPI.dll . Finally, it got published with English version.
link: http://www.windowsphone.com/en-us/store/app/quick-tiles/1725cca2-2349-4d33-b5d5-8b04e7810c04
(You may need to switch your phone language to English to download the English version. otherwise, the Chinese version will be shown. Forgive me for my tight schedule and I have to split different languages into different XAPs, for I only spent 2 hours developing this app...)
I've found two ways to pass the marketplace API detect, one is to use P/Invoke and the other is to load LoadLibraryExW without extern that from the lib provided by Microsoft.
both methods will be provided here in a month, and I may provide write some wrappers or static libraries.
Notice that I only found ways to access restricted API, but get higher privilege is not possible.
By this way, I think @GoodDayToDie 's HTTP Server with registry browser can be published with some simple modify. Even publishing the samsung interop unlock guide, which launches the toast using undocumented, is possible. Maybe we should try to find more useful functions which can be called without privilege in different dlls.
Click to expand...
Click to collapse
Interesting. But almost useless cause now all can freely make a developer unlock. Store apps can use RPC but this requires InteropServices CAP.
-W_O_L_F- said:
Interesting. But almost useless cause now all can freely make a developer unlock. Store apps can use RPC but this requires InteropServices CAP.
Click to expand...
Click to collapse
yes I tried it before in beta app .
ID_CAP_INTEROPSERVICES , Xbox live and exe files in xap are unable to upload !
And those APIs work without having the restricted capabilities in the manifest file?
After the update, it went back to Chinese... it would be nice if you set English as the default language, at least for European and American countries
mcosmin222 said:
And those APIs work without having the restricted capabilities in the manifest file?
Click to expand...
Click to collapse
Yes.
-W_O_L_F- said:
Yes.
Click to expand...
Click to collapse
Hmmm
This looks interesting.
P/Invoke? How did you manage to use it? I thought it was not available for Silverlight?
pinvoke is possible with silverlight, but according to microsoft it is illegal on the marketplace.
which is half true. you cant pinvoke a native dll compiled for arm, but the wp8 own dlls seem to make an exception
mcosmin222 said:
you cant pinvoke a native dll compiled for arm, but the wp8 own dlls seem to make an exception
Click to expand...
Click to collapse
What is the difference?
Useless guy said:
What is the difference?
Click to expand...
Click to collapse
Go ask microsoft.
If you scroll down you will find that p/invoke is not allowed in wp8 sdk
http://msdn.microsoft.com/en-us/lib...jj206940(v=vs.105).aspx#BKMK_Appcompatibility
however, the OP seems to have managed to do it with a DLL contained in the WP8 system.
I never actually tried to p/invoke something on the marketplace. Maybe this needs additional research to see if arm compiled third party dlls can be used.
I remember some guy on the forum trying to p/invoke a native ARM dll and got type load exceptions.
by native i mean something which is not compiled with C++/CX for windows phone. As in pure C/C++ targeted for ARM.
mcosmin222 said:
Go ask microsoft.
If you scroll down you will find that p/invoke is not allowed in wp8 sdk
http://msdn.microsoft.com/en-us/lib...jj206940(v=vs.105).aspx#BKMK_Appcompatibility
however, the OP seems to have managed to do it with a DLL contained in the WP8 system.
I never actually tried to p/invoke something on the marketplace. Maybe this needs additional research to see if arm compiled third party dlls can be used.
I remember some guy on the forum trying to p/invoke a native ARM dll and got type load exceptions.
by native i mean something which is not compiled with C++/CX for windows phone. As in pure C/C++ targeted for ARM.
Click to expand...
Click to collapse
I know what pinvoke is perfectly, don't send me to msdn as long as I'm able to find it by myself.
Both an unmanaged dll and a WinRT component are native. CLR wraps every COM\WinRT object in the Runtime Callable Wrapper, but the object itself stays in the unmanaged heap.
If you think that WinRT or C++/CX are not native, you're wrong.
To @hjc4869
How did you manage to bypass marketplace analysis using P\Invoke? I'm fairly certain that MS checks metadata for DllImport attribute.
I'm going to try the second way, thanks!
Useless guy said:
I know what pinvoke is perfectly, don't send me to msdn as long as I'm able to find it by myself.
Both an unmanaged dll and a WinRT component are native. CLR wraps every COM\WinRT object in the Runtime Callable Wrapper, but the object itself stays in the unmanaged heap.
If you think that WinRT or C++/CX are not native, you're wrong.
To @hjc4869
How did you manage to bypass marketplace analysis using P\Invoke? I'm fairly certain that MS checks metadata for DllImport attribute.
I'm going to try the second way, thanks!
Click to expand...
Click to collapse
never said you don't know what p/invoke is.
I just wanted to show you that it is illegal in wp8 SDK (which that link leads to).
And if you actually read that link, you would see that invoking winRT or C++/CX (compiled for WP8) is allowed. This is probably due to the fact that these methods still execute in a sandbox. While MS won't allow arm compiled dll without the WP8 SDK because it can't verify its security.
mcosmin222 said:
And if you actually read that link, you would see that invoking winRT or C++/CX (compiled for WP8) is allowed. This is probably due to the fact that these methods still execute in a sandbox. While MS won't allow arm compiled dll without the WP8 SDK because it can't verify its security.
Click to expand...
Click to collapse
What does it mean - compile for WP8? I can add to the package any dll that uses Win32 (non-restricted) and compiled for ARM. The library will work on both WP and W8 without recompilaton.
Useless guy said:
What does it mean - compile for WP8? I can add to the package any dll that uses Win32 (non-restricted) and compiled for ARM. The library will work on both WP and W8 without recompilaton.
Click to expand...
Click to collapse
Will it? When you compile a C++ dll for desktop, it references kernel32.dll and unless you explicitly exclude it from the linker, it couldn't possible work on WP8 since there's no kernel32.dll.
Hi all
Trying to play with this method, but it seems LoadLibraryExW is not available. The only function available is LoadPackagedLibrary and when I try to run it, I've got C00000D error which is STATUS_INVALID_PARAMETER.
---------- Post added at 01:03 PM ---------- Previous post was at 12:49 PM ----------
It seems LoadPackagedLibrary only loads .dll from installation folder of application and do not allows full path in name. Thats why I got invalid argument error
Useless guy said:
What is the difference?
Click to expand...
Click to collapse
Code signature.
Sunius1 said:
Will it? When you compile a C++ dll for desktop, it references kernel32.dll and unless you explicitly exclude it from the linker, it couldn't possible work on WP8 since there's no kernel32.dll.
Click to expand...
Click to collapse
Kernel32.dll is the huge part of Win32 and it exists on both WP and Windows. WPSDK doesn't include kernel32.lib, but I'm pretty sure it can be easily generated from dll file.
#define WINAPI_PARTITION_DESKTOP and kernel32.lib should work, I think.
UPD:
I forgot, kernel32 could be removed as it's just the compatability layer for kernelbase.dll and new windows 8 api sets (api-ms-*.dll).
clrokr said:
Code signature.
Click to expand...
Click to collapse
DLLs are signing on certification process.
Nativer SDK is a new library that enables dynamic resource handling, on-device app translation and language practicing. Currently it supports Android apps written in Java.
We created a sample Android app with the SDK built in to demonstrate the operation on user level. We put the source of this demo app on GitHub: https://github.com/Transround/LocalizationDemoDev
You can try the user experience, by downloading the sample app from GooglePlay
Please try it and comment.
If it raised your interest, you can go on to register.
If you want more info, visit our website.
app demo
You can see a demo here: www.transround.com/?utm_source=xda&utm_medium=mktglocalization&utm_campaign=localizationsdk
App language localization SDK is in Android weekly under Libraries & code section.
We prepared a plugin for Android Studio and IntelliJ IDEA to provide automated integration of Nativer SDK. It is available on Github:https://github.com/Transround/Native...android-studio and in IntelliJ plugin repository http://plugins.jetbrains.com/plugin/7637?pr=androidstudio
In case you use Android Studio or IntellJ, you can make your app translated to 70+ languages and be ready for further translation by your users within a few minutes. Try it – you only risk only 5-10 minutes of your time to discover an exciting and suprisingly effective new technology.
gyuri bp said:
Nativer SDK is a new library that enables dynamic resource handling, on-device app translation and language practicing. Currently it supports Android apps written in Java.
We created a sample Android app with the SDK built in to demonstrate the operation on user level. We put the source of this demo app on GitHub: https://github.com/Transround/LocalizationDemoDev
You can try the user experience, by downloading the sample app from GooglePlay
Please try it and comment.
If it raised your interest, you can go on to register.
If you want more info, visit our website.
Click to expand...
Click to collapse
It’s just 20 minutes of your time to let users learn and practice languages while translating and using your app.
Android multilingual runtime extension: the Nativer SDK
… is a new app localization technology for Java Android apps that implements dynamic string resource management. It separates the translation from the development process and supports on-the-fly resource distribution, so no app redeployment is needed when adding more languages.
Integrating the Nativer SDK with your app and uploading resources into the translation service requires less than 20 minutes. There is no source code modification required, removing the SDK is easy.
The Nativer SDK uses aspect oriented programming (AOP) with AspectJ; work is done automatically at build time. Tested with:
• Build tools: Gradle
• IDEs: Eclipse, Android Studio and IntelliJ IDEA (SDK on Github)
• +automated integration plugin for Android Studio and IntelliJ IDEA. (AS plugin on Github)
The SDK and the service are free for developers up to 4000 words/apps.
Switch languages with a shake
The Nativer SDK and service adds multilingual features while translating and using apps.
App resources are automatically translated via machine translation and app category specific translation memory. Any user can improve the quality by adding new or voting on existing translations, reporting bad or mistranslations.
All translation work is done "in context": on the smart device while using the app, translator immediately sees how the translated text looks like in its original environment.
Approved translations can be downloaded with one click. The app language can be set independently from the phone language that helps learning and practicing languages.
Built in Klingon
This ease of app localization ensures access for all. Even minority languages will be served properly but without any effect on your budget.
Users prefer localized apps. The multilingual features result in higher usage time and more loyal user base.
We support 70+ languages. Localizing your app into 70+ languages has a big impact on the Served Available Market and may bring you more users.
How it works?
What you have to do?
• Build the SDK in your app (Github)
-> With Eclipse it takes no more than 20 min
-> With Android Studio it takes only 1-2 min (AS plugin)
• Publish your app
• Follow the progress and enjoy the result
How translation happens?
App resources are automatically translated via machine translation and app category specific translation memory. Any user can improve the quality by adding new or voting on existing translations, reporting bad or mistranslations.
How users get translations?
Since translation is separated from the development process and users get on-the-fly resource distribution, so no app redeployment is needed when adding more languages.
If you want to control translation
You can override the automated translation and distribution process if you want:
• Exclude already translated resources from translation and distribution process
• Exclude any language by any reason
• Determine localizations to be published or not by language
• Translation review by string
We prepared a tool window for easier usage and to track how translation goes on. It's also in IntelliJ plugin repository http://plugins.jetbrains.com/plugin/7637?pr=androidstudio