Admin Admin
Posts : 67 L337 R4NK : 201 R3p : 0 Join date : 2013-09-21 Age : 34 Location : https://www.youtube.com/BaSs_HaXoR
| Subject: How to get PS3Lib & CCAPI to work with WINDOWS 8 Applications/Portable Apps Thu Jun 26, 2014 6:58 pm | |
| [You must be registered and logged in to see this link.]#1 [The MAIN Question] - Code:
-
Okay, first off i would like to say i have already looked this question over myself before asking, with that being said i get errors as an outcome. I'm trying to convert a (open source) library to a portable class library so i can use the library in my Windows 8 App Development since Windows 8 App Development doesn't support Class Library's. The problem is for some reason i get errors like this: http://prntscr.com/3wlw2a[^] ...And YES, i do have "using System.Runtime.InteropServices;" at the top. http://prntscr.com/3wlwp5[^] http://prntscr.com/3wlww2[^] For anyone wondering, I'm trying to convert this: https://ps3lib.codeplex.com/releases/view/108287[^]
#2) - Code:
-
You get this error because a Portable Class Library does not support DllImport. When you think about it, you can see why this would be the case - the whole point of PCLs is that they can be used across platforms, but what you are trying to do is very much platform specific, you don't get the same DLLs on a Windows Phone that you do on a Windows desktop box. @Pete O'Hanlon
#3 - Code:
-
Okay thanks for the response! Smile | But even without DllImport, would it still be possible to go about it a different way? -I feel so close, but yet so far away. Also, (if it came down to it) couldn't I just go about it by P-Invoking it through the default class library (.dll) through the WIN8 Application i'm making?
#4 - Code:
-
Looking at the fact you're trying to do marshalling as well as importing DLLs, I don't see how you're easily going to achieve this. What you might have to do is drop down from your PCL into a platform specific part here.
#5 [THE (WorkAround) SOLUTION] - Code:
-
Well, thank you for trying to help... Really i appreciate it, but i figured out a workaround without needing to convert the source to a portable library. Thanks.
[(KINDA) SOLVED]
(KINDA) Solution: What i did... I used the source from PS3Lib and put all of the classes in my Windows 8 Application, took out all references regarding TMAPI/TMAPI.dll/TMAPI_NET.cs entirely. CCAPI ONLY Compatible PS3Lib (Which is okay, as portable apps assentially wouldn't be able to execute ProDG TargetManager or the ProDebugger on they're phone.), CCAPI.dll only calls. Since the Portable Class Library doesn't support use of [DllImport("PS3Lib.dll")]/etc, and import/use of CCAPI.dll the Windows 8 Application (C#/XAML) itself does... kinda a loophole in a way... Instead of converting a class-library to a portable-class-library for my APP i put the library within it manually with the classes(.cs) and the removal of TMAPI.
P.S. I still think TMAPI would be possible for [WINDOWS 8 APPS ONLY], but i don't really care to mess around too much with it as i don't see it going anywhere as CCAPI.dll & PS3Lib.dll will be more realistic.
Again thanks for all your help Pete O'Hanlon.
P.P.S. Like i said this is KINDA solved, it fixed my issue by going about programming it a different way, but still isn't THE solution if you know what i mean. ;)
| |
|