On 3/8/2016 7:33 AM, Tobias Wolf wrote:
We`re develping a PKCS11 modul in c/c++ for a custom card reader to support. I
just want to display a simple dialog.
This is not a good idea. I don't believe that PKCS11 modules run on the
UI thread and so trying to do anything with XPCOM from this thread is
pretty much doomed. Even if this isn't the case, binary XPCOM is not
considered a stable API and so your code would have to be recompiled for
every release.
The code below works great until I stay on MS Visual Studio. But our project
is running on eclipse/gcc.
nsCOMPtr<nsIPromptService> promptService =
do_GetService("@mozilla.org/embedcomp/prompt-service;1"));
promptService->Alert(NULL, NULL, NULL);
I`m getting the following error during linking, that comes because of the
different coding convention between VS and mingw/gcc on windows.
That's correct. The c++ ABI is incompatible. There is essentially no way
to fix this. Even if you use an SDK compiled with GCC instead of MSVC,
the vtable format for interfaces is not the same and so you won't be
able to use them.
--BDS
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform