Array size control parameter type not supported error

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Array size control parameter type not supported error

Postby Bodwad » Tue Jan 08, 2013 12:58 pm

Hello, I am getting a strange error on one of my DLL's being run through SmartAssembly 6.7 and I cant find any mention anywhere else on this forum so I was wondering if anyone had come accross this problem before.

When I run my DLL through Smart Assembly with all features switched off(for testing purposes) I get the following error

System.Runtime.InteropServices.MarshalDirectiveException: Array size control parameter type not supported.
----------------------------------------------------------------------
at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegateInternal(Delegate d):

The dll works fine if I dont run it through Smart Assembly and all my other dll's and exe's work just fine. I was wondering what smart assembly does to the dll even when all settings are disabled?

Thanks for any help you can offer :)

Paul
Bodwad
 
Posts: 2
Joined: Tue Jan 08, 2013 12:50 pm

Postby Chris.Allen » Thu Jan 17, 2013 12:20 am

I noticed that the following discussion was initiated by a *similar* error to yours:

http://www.developmentnow.com/g/21_2003 ... l-type.htm



The solution was a little bit of refactoring to make the size of the array passed explicit, I think.

Maybe it helps as a workaround.

I'll continue to research this as it is rather interesting! :)
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby Chris.Allen » Thu Jan 17, 2013 12:23 am

The IL that smartassembly produces will differ slightly from the original (even with no features on(!)). It will use the long form of instructions whereas yours will use the short form (e.g. brtrue not brtrue.s).

http://en.wikipedia.org/wiki/List_of_CIL_instructions

I've a feeling this is *too* interesting lolz
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby Chris.Allen » Thu Jan 17, 2013 12:41 am

Also, what calling convention are using using? Smartassembly will use Standard I believe.
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby Bodwad » Thu Jan 17, 2013 9:44 am

Hello thanks for all the info :D

The problem has been submitted to Redgate support at the moment and they are looking into the issue as they have a demo to work with. I will let you know what happens 8)

Paul
Bodwad
 
Posts: 2
Joined: Tue Jan 08, 2013 12:50 pm


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests