It is currently September 25th, 2022, 3:27 pm

DLLExporter error

Share and get help with Plugins and Addons
bigparty
Posts: 5
Joined: March 7th, 2021, 7:39 pm

DLLExporter error

Post by bigparty »

Hi.

I'm trying to develop a plugin that needs some Windows API contracts, to use GlobalSystemMediaTransportControlsSessionManager and IAsyncOperation. When I make the references and use the methods I get the following error:

syntax error at token 'Windows.Foundation.FoundationContract' in: .assembly extern windowsruntime Windows.Foundation.FoundationContract PluginSystemVersio

EXEC : DllExporter error : Unable to assemble!


following the error I get the assembly:

Code: Select all

...
// Metadata version: v4.0.30319
.module extern Rainmeter.dll
.assembly extern mscorlib
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z\V.4..
  .ver 4:0:0:0
}
.assembly extern windowsruntime Windows.Foundation.FoundationContract
{
  .ver 3:0:0:0
}
.assembly extern windowsruntime Windows.Foundation.UniversalApiContract
{
  .ver 7:0:0:0
}
...
Has anyone run into the same problem?
User avatar
death.crafter
Rainmeter Sage
Posts: 1398
Joined: April 24th, 2021, 8:13 pm

Re: DLLExporter error

Post by death.crafter »

bigparty wrote: November 12th, 2021, 3:13 pm Hi.

I'm trying to develop a plugin that needs some Windows API contracts, to use GlobalSystemMediaTransportControlsSessionManager and IAsyncOperation. When I make the references and use the methods I get the following error:

syntax error at token 'Windows.Foundation.FoundationContract' in: .assembly extern windowsruntime Windows.Foundation.FoundationContract PluginSystemVersio

EXEC : DllExporter error : Unable to assemble!


following the error I get the assembly:

Code: Select all

...
// Metadata version: v4.0.30319
.module extern Rainmeter.dll
.assembly extern mscorlib
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z\V.4..
  .ver 4:0:0:0
}
.assembly extern windowsruntime Windows.Foundation.FoundationContract
{
  .ver 3:0:0:0
}
.assembly extern windowsruntime Windows.Foundation.UniversalApiContract
{
  .ver 7:0:0:0
}
...
Has anyone run into the same problem?
I don't exactly remember but this error is raised due to target platform version and TFM, in your project file. Try messing around with those.
from the Realm of Death
mysterd2006
Posts: 2
Joined: July 11th, 2022, 5:17 pm

Re: DLLExporter error

Post by mysterd2006 »

Hello

Did you find a solution to your problem ? I have the exact same situation trying to use the GlobalSystemMediaTransportControlsSessionManager interface.
It seems that DllExporter isn't compatible with modern .Net Framework versions, and I can't use .Net Framework 2.0 because of other dependencies...

Thanks in advance for your help
mysterd2006
Posts: 2
Joined: July 11th, 2022, 5:17 pm

Re: DLLExporter error

Post by mysterd2006 »

Update: I could successfully perform the assembly, after having modified DllExporter source to use latest .net framework and compiled it.
However, I don't know if the resulting Dll will be usable as a rainmeter plugin yet :)
I'll keep you posted.
dethknite
Posts: 12
Joined: May 7th, 2021, 3:19 pm

Re: DLLExporter error

Post by dethknite »

If you still have issue, lmk and I can look to see if some of the modifications I made to a similar DllExport routine I use for x64 bit code and dynamic virtual channels would be helpful here. I ran into a lot of weird stuff over the last several years crossing .NET and then the bitness changes.
bigparty
Posts: 5
Joined: March 7th, 2021, 7:39 pm

Re: DLLExporter error

Post by bigparty »

mysterd2006 wrote: July 11th, 2022, 5:49 pm Update: I could successfully perform the assembly, after having modified DllExporter source to use latest .net framework and compiled it.
However, I don't know if the resulting Dll will be usable as a rainmeter plugin yet :)
I'll keep you posted.
It worked?
bigparty
Posts: 5
Joined: March 7th, 2021, 7:39 pm

Re: DLLExporter error

Post by bigparty »

dethknite wrote: July 31st, 2022, 6:01 pm If you still have issue, lmk and I can look to see if some of the modifications I made to a similar DllExport routine I use for x64 bit code and dynamic virtual channels would be helpful here. I ran into a lot of weird stuff over the last several years crossing .NET and then the bitness changes.
Can you share this project?
User avatar
death.crafter
Rainmeter Sage
Posts: 1398
Joined: April 24th, 2021, 8:13 pm

Re: DLLExporter error

Post by death.crafter »

Replace your DLLExporter.exe with this one
You do not have the required permissions to view the files attached to this post.
from the Realm of Death