Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all 1710 articles
Browse latest View live

private communication between .NET and C++ native DLL.

$
0
0
Hello

I have a .net program that use DllImport to call a c++ native function exposed in a dll. My .NET program calls this function with a password that I would like to keep secret. I care about the security of my application and I would like to know if it's possible for someone to catch the password at runtime during the time between it is emitted by the .NET program till it's received by the DLL. I wonder if it's easier to catch confidential data in such context of communication between 2 different programs?

I'm not well aware about such spying technique.. so I'm very grateful for any explanations you can give.

Max

basic question newbie set permissions in Visual Studio

$
0
0
I cannot save any files in Visual Studio 3013 - IIS7 - Windows7.  I am Administrator and set IIS_IUSRS but I am locked out of changing the properties.  I own the machine exclusively.  How to set permissions so I can edit files? 

Need an example of how to use CustomACE

$
0
0

I am posting here as this is primarily a Security/Permissions in .Net question, and no other forum seems to fit.

I want to use the CustomACE class to create an ACE for the MANDATORY_INTEGRITY_LOW permission, I figure I can use the CustomACE class for this, but I have no idea how to initialize it.  A working sample would be helpful, or any other explanation on how to use this.

My intent is to create a "helper" executable for a IE add-on.  With Vista/Win7, add-ons now run in a low integrity state, and cannot normally communicate with various resources.  However a helper executable can be launched.  My intent is then to create a Remoting channel using the IpcChannel so that they can communicate.  However the IpcChannel needs to be opened with the MANDATORY_INTEGRITY_LOW ACE so that the add-ons can open the channel.

Because the MANDATORY_INTEGRITY_LOW permission is fairly new (Vista and onwards), it doesn't seem to have made it into the .Net framework yet, so the only option thatI can see is to use the CustomACE class to "roll my own".

Any help would be most appreciated.

Preparing Publisher policy for Oracle.dataaccess.dll

$
0
0

Hi,

Can anyone tell me how to create a publisher policy file? I am having an oracle.dataaccess dll from oracle. but i want to redirect it to latest version. I dont know where i have to create and save publisher.config file and how to take a dll from it? even i dont know how to prepare keypair vale for it?

 

Could you please tell me stap by step?

Regards

Chellu.

.NET Framework 2.0 Code Calling .NET Framework 4.0 Code

$
0
0

Hi,

Is there a prescribed approach for calling .NET Framework 4.0 code from existing .NET 2.0 code directly? 

What are the Pros and Cons of this? 

Regards,

Vikram


Blog: http://dotnetupdate.blogspot.com |

What CLR version fixes the "DoStackSnapshot on 64-bit CLR 4" bug?

$
0
0

There is a bug mentioned in David Broman's response to this thread:
http://social.msdn.microsoft.com/Forums/vstudio/en-US/c1c37c3d-d059-4328-82fd-bef1758e2c94/asynchronous-walking-of-the-net-managed-stack-using-dostacksnapshot-sampling-profiler-does-not

Can someone say exactly what version of the CLR this was fixed in?  In that thread he says it was "fixed in the CLR 4.5 beta" but if I understand CLR versioning correctly (I may not) it never got to 4.5 but instead stayed on 4.0.30319.* with patch fixes after that.  I want to be able to identify if our customers are running into this issue or something else but to do that I need to know what to look for to identify whether or not they have the fix referred to in the above post.

I believe the .NET 4.5 Beta (Consumer Preview) was CLR version 4.0.30319.17379, so perhaps it was fixed in that version and up but I want to make sure before I commit to asking my users experiencing problems to update.

System.ArgumentException,what's the meaning?

$
0
0

Hello,everyone.

(My english is bad)

Anyone can tell me how to solve this problem?My website throw out this exception almost everyday,and then responses nothing.I have to restart the server.I use linux+jexus.How to solve this problem?

Thank you very much!


System.ArgumentException
Key duplication when adding: sessionStateDescription: HTTP 500.Error processing request.

Details: Non-web exception. Exception origin (name of application or object): mscorlib.

Exception stack trace:
  at System.Collections.Hashtable.PutImpl (System.Object key, System.Object value, Boolean overwrite) [0x00000] in <filename unknown>:0 
  at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x00000] in <filename unknown>:0 
  at System.Collections.Specialized.NameObjectCollectionBase.BaseAdd (System.String name, System.Object value) [0x00000] in <filename unknown>:0 
  at System.Collections.Specialized.NameObjectCollectionBase.BaseSet (System.String name, System.Object value) [0x00000] in <filename unknown>:0 
  at System.Configuration.ConfigurationSectionCollection.get_Item (System.String name) [0x00000] in <filename unknown>:0 
  at System.Configuration.Configuration.GetSection (System.String path) [0x00000] in <filename unknown>:0 
  at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path, System.Web.HttpContext context) [0x00000] in <filename unknown>:0 
  at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName) [0x00000] in <filename unknown>:0 
  at System.Web.SessionState.SessionStateModule.Init (System.Web.HttpApplication app) [0x00000] in <filename unknown>:0 
  at System.Web.Configuration.HttpModulesSection.LoadModules (System.Web.HttpApplication app) [0x00000] in <filename unknown>:0 
  at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x00000] in <filename unknown>:0 
Version Information: 3.2.0 (tarball 2013年 08月 02日 星期五 20:42:13 CST); ASP.NET Version: 4.0.30319.17020
Powered by Mono


registration free COM/Interop with SilverLight

$
0
0

I am trying to activate a COM-visible .NET assembly using the activation context API from SilverLight using the following configuration:

IE ->

SilverLIght component ->
AssemblyLoader.dll -
                unmanaged (not-COM)
                [manifest with dependency on AssemblyDLL's manifest] ->                                                                                                                                                                                              AssemblyNET.dll (COM visible)[manifest]

The manifests are not embedded. The activation context succeeds by loading the AssemblyLoader.dll.manifest but the result from CoCreateInstance of any object from AssemblyNET.dll is always 

hr0x80070002 The system cannot find the file specified.

I can successfully call the CoCreateInstance in the following configuration:

Test.exe using the AssemblyNET.dll.manifest to create the activation context -> AssemblyNET.dll (COM visible)[manifest]

Is this kind of activation context setup possible?



Program looking for *.resources.(dll|exe) files with no apparent reason

$
0
0

Hello all,

 I have an .NET executable that loads some .NET assemblies using reflection. It works fine most of the time, but at one of our clients, whose users connect to the same machine via Citrix, it fails to start with the following exception: "Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0...' failed."

When starting it on the machine directly, everything is OK.

While investigating the issue, their admin intercepted QueryOpen and CreateFile operations on our program's behalf with <assembly>.resources.dll
<assembly>.resources.exe, where <assembly> is one of the libraties our program accesses via reflection.

 It was quite a surprize for me because neither of these files are present at the client. They are not generated during build, so it was in that log that I saw them for the first time. We do not use any localization or generate satellite assemblies...

Do you have an idea as to why the program is looking for these files?


perfview: unreachable memory

$
0
0

Hi folks,

I'm using perfview for .net memory leak analysis and I was wondering what unreachable memory is representing?  I see a sizable difference in unreachable memory between two dumps that is considerable so I was curious.  Would this be the same as "private bytes" using other tools like vmmap from sysinternals?

thanks,

JJ



KEADAKASA2010

$
0
0
What is a P9: invalidoperationexception  on a download?

Memory leak in system timer event in framework 3.5 and in framework 2.0

$
0
0

I use C# in VS 2008 framework 3.5 and VS2005 framework 2.0.

When I use system timer, I find in every several seconds it increases 8K memory usage and keep increasing as long as you wish. Here is the code. You can cut and paste it in console application in either vs2008 or vs2005, compile and run it. Then you can observe the memory increase. Does anyone have a solution or work around?


 

Using System;

using System.Timers;

publicclassTimer1

{

publicstaticvoid Main()

{

System.Timers.Timer aTimer = new System.Timers.Timer();

aTimer.Elapsed += newElapsedEventHandler(OnTimedEvent);

aTimer.Interval =75;

aTimer.Enabled = true;

Console.WriteLine("Press the Enter key to exit the program.");

Console.ReadLine();

GC.KeepAlive(aTimer);

}

privatestaticvoid OnTimedEvent(object source, ElapsedEventArgs e)

{

Console.WriteLine("Hello World!");

}

}

Queries on Implementing Obfuscation of code for .NET Dll's using Dotfuscator

$
0
0

Hi All,

I am working on assignment for .NET project requiring Obfuscation, here we are working on specific modules comprising 12 dll's(all of .NET dll's), I need clarification on few aspects related to .NET Obfuscation of Dll's (since I am new to providing obfuscation for .NET dll's).

Using Dotfuscator tool (professional editon 4.5v) in GUI Standalone mode,

1. How we need to ensure obfuscation of dll in release mode., since, the dll obfuscation to be effected in Debug mode, could not the same dll's hold good in release mode too ?

I heard the Debug mode would be discarded by the Obfuscation tool(DotFuscator tool).

2. If multiple binaries are output by the build for same assembly/module.,

assuming C:\MyProject\Updatedll\Bin\UpdateDll1.dll   and similarly C:\MyProject\SubProject\MinorUpdate\UpdateDll1.dll  both these dll's are one and same, but when I build the project using DotObfuscator, I need to run the tasks again for above dll's(UpdateDll1.dll) if could it be uniquely handled ?

3. What are procedures/steps to load/build assemblies of dll's only instead of exe's in DotObfuscator tool.

Details: VS 2010 IDE, Windows 7 O/S. Using Perforce Version control tool.

Any help in resolving the above would be much appreciable.

Thanks & Regards,

VishalK_99


Vishal_K89

Access violation and closing application

$
0
0
Hi,
I have problems to run 1 module of internal application, after run application has closed whitout any system errors, i use fileemonn and don´t have any file missed. Can you help-me please ?
Regards,
-----
Microsoft (R) DrWtsn32
Copyright (C) 1985-2001 Microsoft Corp. All rights reserved.
Application exception occurred:
        App: Y:\Path\OFS\EXE\Ofsrdc.exe (pid=2904)
        When: 15/06/2011 @ 09:38:47.954
        Exception number: c0000005 (access violation)
*----> System Information <----*
        Computer Name: COMP_ERROR
        User Name: XXX
        Terminal Session Id: 0
        Number of Processors: 2
        Processor Type: x86 Family 6 Model 15 Stepping 11
        Windows Version: 5.1
        Current Build: 2600
        Service Pack: 3
        Current Type: Multiprocessor Free
        Registered Organization: Company Name
        Registered Owner: Full Name
*----> Task List <----*
   0 System Process
   4 Error 0xD0000022
 420 Error 0xD0000022
 476 Error 0xD0000022
 500 Error 0xD0000022
 544 Error 0xD0000022
 556 Error 0xD0000022
 748 Error 0xD0000022
 800 Error 0xD0000022
 868 Error 0xD0000022
 912 Error 0xD0000022
 980 Error 0xD0000022
1044 Error 0xD0000022
1240 Error 0xD0000022
1284 Error 0xD0000022
1324 Error 0xD0000022
1448 Error 0xD0000022
1500 Error 0xD0000022
1512 Error 0xD0000022
1588 Error 0xD0000022
1652 Error 0xD0000022
1664 Error 0xD0000022
1692 Error 0xD0000022
1716 Error 0xD0000022
1728 Error 0xD0000022
1808 Error 0xD0000022
1924 Error 0xD0000022
1976 Error 0xD0000022
 228 Error 0xD0000022
2376 Error 0xD0000022
2432 Error 0xD0000022
2608 Error 0xD0000022
3124 Explorer.EXE
3804 SHSTAT.EXE
3400 igfxtray.exe
2472 hkcmd.exe
1264 igfxsrvc.exe
2720 igfxpers.exe
3188 smax4pnp.exe
4032 udaterui.exe
3420 Error 0xD0000022
2628 concentr.exe
2228 discfcsn.exe
1084 ctfmon.exe
2672 wfcrun32.exe
3472 WindowsSearch.exe
3840 McTray.exe
2732 Error 0xD0000022
2564 Error 0xD0000022
2904 Ofsrdc.exe
 724 Error 0xD0000022
2604 drwtsn32.exe
*----> Module List <----*
(0000000000400000 - 000000000066b000: Y:\SP01_Programs1\OFS\EXE\Ofsrdc.exe
(0000000001560000 - 000000000159a000: Y:\SP01_Programs1\DMS\EXE\CPALIB.DLL
(0000000001610000 - 000000000161b000: Y:\SP01_Programs1\DMS\Exe\CpaGpnSG.dll
(0000000001620000 - 0000000001647000: C:\WINNT\system32\SGWAY.dll
(0000000002310000 - 00000000025d5000: C:\WINNT\system32\xpsp2res.dll
(0000000002720000 - 0000000002724000: C:\Program Files\Common Files\System\Ole DB\MSDASQLR.DLL
(0000000002a80000 - 0000000002acd000: C:\Program Files\Common Files\System\Ole DB\msdasql.dll
(0000000002c10000 - 0000000002c27000: C:\WINNT\system32\odbcint.dll
(0000000002d30000 - 0000000002d35000: C:\WINNT\system32\msorc32r.dll
(0000000002d40000 - 0000000002d5a000: C:\ORACLE\ORA81\bin\oci.dll
(0000000002d60000 - 0000000002d92000: C:\ORACLE\ora81\FORMS\bin\NS80.dll
(00000000031e0000 - 00000000032e6000: C:\ORACLE\ORA81\bin\OraClient8.Dll
(00000000032f0000 - 000000000333d000: C:\ORACLE\ORA81\bin\oranls8.dll
(0000000003340000 - 0000000003346000: C:\ORACLE\ORA81\bin\oravsn8.dll
(0000000003350000 - 00000000033b5000: C:\ORACLE\ORA81\bin\oracommon8.dll
(00000000033c0000 - 0000000003469000: C:\ORACLE\ORA81\bin\oran8.dll
(0000000003470000 - 00000000034a7000: C:\ORACLE\ORA81\bin\oranro8.dll
(00000000034b0000 - 0000000003511000: C:\ORACLE\ORA81\bin\orannzsbb8.dll
(0000000003520000 - 000000000352e000: C:\ORACLE\ORA81\bin\oranldap8.dll
(0000000003530000 - 0000000003550000: C:\ORACLE\ORA81\bin\oraldapclnt8.dll
(0000000003550000 - 0000000003556000: C:\ORACLE\ORA81\bin\oranhost8.dll
(0000000003560000 - 0000000003566000: C:\ORACLE\ORA81\bin\orancds8.dll
(0000000003570000 - 0000000003576000: C:\ORACLE\ORA81\bin\orantns8.dll
(0000000003580000 - 0000000003587000: C:\ORACLE\ORA81\bin\oranms.dll
(0000000003590000 - 00000000035a1000: C:\ORACLE\ORA81\bin\oranmsp.dll
(0000000003a00000 - 0000000003a18000: C:\WINNT\system32\PasswordManager.dll
(0000000003b70000 - 0000000003b7f000: C:\ORACLE\ORA81\bin\sqresUS.dll
(0000000003b90000 - 0000000003b95000: C:\Program Files\Common Files\System\msadc\msadcer.dll
(0000000004c00000 - 0000000004c72000: C:\ORACLE\ora81\bin\SQORA32.DLL
(0000000010000000 - 0000000010036000: c:\WINNT\system32\THREED32.OCX
(0000000011000000 - 0000000011089000: Y:\SP01_Programs1\DMS\EXE\CPALINK.OCX
(0000000021f40000 - 0000000021f69000: c:\WINNT\system32\MSMASK32.OCX
(0000000023670000 - 00000000236d1000: C:\WINNT\system32\MSRDO20.DLL
(000000003dfd0000 - 000000003e015000: C:\WINNT\system32\iertutil.dll
(000000004baa0000 - 000000004bab1000: C:\WINNT\system32\ODBCCR32.DLL
(000000004ff80000 - 000000004ffa4000: C:\WINNT\system32\msorcl32.dll
(000000005ad70000 - 000000005ada8000: C:\WINNT\system32\uxtheme.dll
(000000005b860000 - 000000005b8b5000: C:\WINNT\system32\netapi32.dll
(000000005d090000 - 000000005d12a000: C:\WINNT\system32\COMCTL32.dll
(000000005edd0000 - 000000005ede7000: C:\WINNT\system32\OLEPRO32.DLL
(000000005fe80000 - 000000005fe9b000: C:\WINNT\system32\odbccp32.dll
(0000000060000000 - 0000000060122000: C:\ORACLE\ORA81\bin\orageneric8.dll
(0000000060200000 - 0000000060260000: C:\ORACLE\ora81\FORMS\bin\CORE40.dll
(0000000060350000 - 0000000060356000: C:\ORACLE\ORA81\bin\orawtc8.dll
(0000000060400000 - 0000000060429000: C:\ORACLE\ora81\FORMS\bin\nasns80.dll
(0000000060600000 - 0000000060686000: C:\ORACLE\ORA81\bin\oracore8.dll
(0000000060800000 - 0000000060842000: C:\ORACLE\ora81\FORMS\bin\NCR80.dll
(0000000060a00000 - 0000000060a2b000: C:\ORACLE\ORA81\bin\oranl8.dll
(0000000060b00000 - 0000000060b10000: C:\ORACLE\ora81\FORMS\bin\NI80.dll
(0000000060c00000 - 0000000060c1f000: C:\ORACLE\ora81\FORMS\bin\NL80.dll
(0000000060e00000 - 0000000060e0d000: C:\ORACLE\ORA81\bin\orancrypt8.dll
(0000000060e30000 - 0000000060e47000: C:\Program Files\Common Files\System\Ole DB\MSDATL3.dll
(0000000060f00000 - 0000000060f07000: C:\ORACLE\ora81\FORMS\bin\NMP80.dll
(0000000061100000 - 0000000061107000: C:\ORACLE\ora81\FORMS\bin\NMS80.dll
(0000000061400000 - 000000006140b000: C:\ORACLE\ora81\FORMS\bin\NNCI80.dll
(0000000061500000 - 0000000061506000: C:\ORACLE\ora81\FORMS\bin\NNFD80.dll
(0000000061600000 - 000000006160a000: C:\ORACLE\ora81\FORMS\bin\NNFG80.dll
(0000000061700000 - 0000000061708000: C:\ORACLE\ora81\FORMS\bin\NNFN80.dll
(0000000061800000 - 0000000061819000: C:\ORACLE\ora81\FORMS\bin\NNG80.dll
(0000000061900000 - 0000000061908000: C:\ORACLE\ora81\FORMS\bin\NPL80.dll
(0000000061a00000 - 0000000061a17000: C:\ORACLE\ora81\FORMS\bin\NR80.dll
(0000000061a90000 - 0000000061b6f000: c:\WINNT\system32\MFC40.DLL
(0000000061c00000 - 0000000061c09000: C:\ORACLE\ora81\FORMS\bin\NT80.dll
(0000000062100000 - 0000000062106000: C:\ORACLE\ORA81\bin\oranoname8.dll
(0000000062300000 - 000000006234f000: C:\ORACLE\ora81\FORMS\bin\nz80.dll
(0000000062500000 - 0000000062508000: C:\ORACLE\ORA81\bin\orannds8.dll
(0000000062700000 - 0000000062740000: C:\ORACLE\ORA81\bin\ORATRACE8.dll
(0000000062900000 - 0000000062b23000: C:\ORACLE\ORA81\bin\orapls8.dll
(0000000063100000 - 0000000063108000: C:\ORACLE\ORA81\bin\oraslax8.dll
(0000000063200000 - 0000000063273000: C:\ORACLE\ORA81\bin\orasql8.dll
(0000000064700000 - 000000006470b000: C:\ORACLE\ora81\bin\orantcp8.dll
(0000000065200000 - 0000000065240000: C:\ORACLE\ora81\FORMS\bin\OTRACE80.dll
(0000000065400000 - 000000006541f000: C:\ORACLE\ora81\FORMS\bin\xa80.dll
(00000000662b0000 - 0000000066308000: C:\WINNT\system32\hnetcfg.dll
(0000000067470000 - 0000000067492000: C:\ORACLE\ora81\FORMS\bin\SQLLib80.dll
(0000000067560000 - 00000000676f2000: C:\ORACLE\ora81\FORMS\bin\ORA805.dll
(00000000679a0000 - 00000000679dd000: C:\ORACLE\ora81\FORMS\bin\NLSRTL33.dll
(0000000068000000 - 0000000068036000: C:\WINNT\system32\rsaenh.dll
(0000000068100000 - 0000000068126000: C:\WINNT\system32\dssenh.dll
(0000000071a50000 - 0000000071a8f000: C:\WINNT\System32\mswsock.dll
(0000000071a90000 - 0000000071a98000: C:\WINNT\System32\wshtcpip.dll
(0000000071aa0000 - 0000000071aa8000: C:\WINNT\system32\WS2HELP.dll
(0000000071ab0000 - 0000000071ac7000: C:\WINNT\system32\WS2_32.dll
(0000000071ad0000 - 0000000071ad9000: C:\WINNT\system32\WSOCK32.DLL
(0000000073000000 - 0000000073026000: C:\WINNT\system32\WINSPOOL.DRV
(0000000073160000 - 00000000731d7000: C:\Program Files\Common Files\System\Ole DB\oledb32.dll
(0000000073420000 - 0000000073573000: C:\WINNT\system32\MSVBVM60.DLL
(0000000073dd0000 - 0000000073ec1000: c:\WINNT\system32\MFC42.DLL
(0000000074060000 - 00000000740b1000: C:\Program Files\Common Files\System\msadc\msadce.dll
(00000000740c0000 - 000000007420d000: C:\WINNT\system32\MSVBVM50.DLL
(0000000074320000 - 000000007435d000: C:\WINNT\system32\ODBC32.dll
(0000000074720000 - 000000007476c000: C:\WINNT\system32\MSCTF.dll
(0000000074980000 - 0000000074a94000: C:\WINNT\system32\msxml3.dll
(00000000750b0000 - 00000000750c2000: C:\WINNT\system32\RESUTILS.DLL
(00000000750d0000 - 00000000750e9000: C:\WINNT\system32\MTXOCI.DLL
(00000000750f0000 - 0000000075103000: C:\WINNT\system32\MTXCLU.DLL
(0000000075130000 - 0000000075144000: C:\WINNT\system32\colbact.DLL
(0000000075350000 - 0000000075361000: C:\Program Files\Common Files\System\Ole DB\OLEDB32R.DLL
(00000000755c0000 - 00000000755ee000: C:\WINNT\system32\msctfime.ime
(0000000076390000 - 00000000763ad000: C:\WINNT\system32\IMM32.DLL
(00000000763b0000 - 00000000763f9000: C:\WINNT\system32\comdlg32.dll
(00000000765b0000 - 00000000765d5000: C:\WINNT\system32\MSDART.DLL
(0000000076620000 - 000000007675c000: C:\WINNT\system32\comsvcs.dll
(00000000767f0000 - 0000000076818000: C:\WINNT\system32\schannel.dll
(00000000769c0000 - 0000000076a74000: C:\WINNT\system32\userenv.dll
(0000000076b40000 - 0000000076b6d000: C:\WINNT\system32\WINMM.dll
(0000000076d10000 - 0000000076d22000: C:\WINNT\system32\CLUSAPI.DLL
(0000000076f20000 - 0000000076f47000: C:\WINNT\system32\DNSAPI.dll
(0000000076f60000 - 0000000076f8c000: C:\WINNT\system32\WLDAP32.dll
(0000000076fb0000 - 0000000076fb8000: C:\WINNT\System32\winrnr.dll
(0000000076fc0000 - 0000000076fc6000: C:\WINNT\system32\rasadhlp.dll
(0000000076fd0000 - 000000007704f000: C:\WINNT\system32\CLBCATQ.DLL
(0000000077050000 - 0000000077115000: C:\WINNT\system32\COMRes.dll
(0000000077120000 - 00000000771ab000: C:\WINNT\system32\OLEAUT32.dll
(00000000773d0000 - 00000000774d3000: C:\WINNT\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll
(00000000774e0000 - 000000007761e000: C:\WINNT\system32\ole32.dll
(0000000077a80000 - 0000000077b15000: C:\WINNT\system32\crypt32.dll
(0000000077b20000 - 0000000077b32000: C:\WINNT\system32\MSASN1.dll
(0000000077b40000 - 0000000077b62000: C:\WINNT\system32\Apphelp.dll
(0000000077c00000 - 0000000077c08000: C:\WINNT\system32\VERSION.dll
(0000000077c10000 - 0000000077c68000: C:\WINNT\system32\msvcrt.dll
(0000000077dd0000 - 0000000077e6b000: C:\WINNT\system32\ADVAPI32.dll
(0000000077e70000 - 0000000077f03000: C:\WINNT\system32\RPCRT4.dll
(0000000077f10000 - 0000000077f59000: C:\WINNT\system32\GDI32.dll
(0000000077f60000 - 0000000077fd6000: C:\WINNT\system32\SHLWAPI.dll
(0000000077fe0000 - 0000000077ff1000: C:\WINNT\system32\Secur32.dll
(0000000078080000 - 0000000078091000: c:\WINNT\system32\MSVCRT40.dll
(0000000078130000 - 0000000078258000: C:\WINNT\system32\urlmon.dll
(000000007c800000 - 000000007c8f6000: C:\WINNT\system32\kernel32.dll
(000000007c900000 - 000000007c9b2000: C:\WINNT\system32\ntdll.dll
(000000007c9c0000 - 000000007d1d7000: C:\WINNT\system32\SHELL32.dll
(000000007d1e0000 - 000000007d49c000: C:\WINNT\system32\msi.dll
(000000007e410000 - 000000007e4a1000: C:\WINNT\system32\USER32.dll
(000000007e720000 - 000000007e7d0000: C:\WINNT\system32\SXS.DLL
*----> State Dump for Thread Id 0xcf4 <----*
eax=00000000 ebx=00000000 ecx=00000000 edx=00ed3948 esi=00ed393c edi=73430de0
eip=7349c2b1 esp=0012f55c ebp=0012f56c iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINNT\system32\MSVBVM60.DLL - 
function: MSVBVM60!BASIC_DISPINTERFACE_GetTICount
        7349c297 ffff             ???
        7349c299 8bd8             mov     ebx,eax
        7349c29b 85db             test    ebx,ebx
        7349c29d 7d0c  jge MSVBVM60!BASIC_DISPINTERFACE_GetTICount+0x16f53 (7349c2ab)
        7349c29f 8d4dfc           lea     ecx,[ebp-0x4]
        7349c2a2 e8e072f8ff       call    MSVBVM60!EbLibraryLoad+0x32e (73423587)
        7349c2a7 8bc3             mov     eax,ebx
        7349c2a9 ebc9  jmp MSVBVM60!BASIC_DISPINTERFACE_GetTICount+0x16f1c (7349c274)
        7349c2ab 8b4e04           mov     ecx,[esi+0x4]
        7349c2ae ff750c           push    dword ptr [ebp+0xc]
FAULT ->7349c2b1 8b01             mov     eax,[ecx]         ds:0023:00000000=????????
        7349c2b3 ff7508           push    dword ptr [ebp+0x8]
        7349c2b6 ff500c           call    dword ptr [eax+0xc]
        7349c2b9 8d4dfc           lea     ecx,[ebp-0x4]
        7349c2bc 8bf0             mov     esi,eax
        7349c2be e8c472f8ff       call    MSVBVM60!EbLibraryLoad+0x32e (73423587)
        7349c2c3 8bc6             mov     eax,esi
        7349c2c5 ebad  jmp MSVBVM60!BASIC_DISPINTERFACE_GetTICount+0x16f1c (7349c274)
        7349c2c7 55               push    ebp
        7349c2c8 8bec             mov     ebp,esp
        7349c2ca 56               push    esi
*----> Stack Back Trace <----*
WARNING: Stack unwind information not available. Following frames may be wrong.
*** ERROR: Module load completed but symbols could not be loaded for Y:\SP01_Programs1\OFS\EXE\Ofsrdc.exe
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINNT\system32\USER32.dll - 
ChildEBP RetAddr  Args to Child              
0012f56c 7349e999 001518c4 00000004 00ef70fc MSVBVM60!BASIC_DISPINTERFACE_GetTICount+0x16f59
0012f580 73481d51 00ef70fc 00000000 00001011 MSVBVM60!BASIC_DISPINTERFACE_GetTICount+0x19641
0012f6a4 73455da9 00ef70fc 0012f604 0012f6d4 MSVBVM60!IID_IVbaHost+0x33771
0012f7d8 006315bd 001a36f8 001897a4 0012f840 MSVBVM60!IID_IVbaHost+0x77c9
0012fb78 73471ce3 001a36f8 0012fb94 0041188d Ofsrdc+0x2315bd
0012fb84 0041188d 001a3760 004115f8 0012fbe0 MSVBVM60!IID_IVbaHost+0x23703
0012fb94 73471fe4 0041188d 0012fc50 00000002 Ofsrdc+0x1188d
0012fbe0 7347244b 0012fc90 0012fc50 00000002 MSVBVM60!IID_IVbaHost+0x23a04
0012fcb4 73472617 00f01894 00f00e1c 00ed5ba8 MSVBVM60!IID_IVbaHost+0x23e6b
0012fcd8 734dbcd4 00f01894 00000000 00000000 MSVBVM60!IID_IVbaHost+0x24037
0012fcf0 7347ce03 00f01894 001303c8 00000113 MSVBVM60!EbLibraryUnload+0x1550d
0012fd18 7347f800 00f01894 001303c8 00000113 MSVBVM60!IID_IVbaHost+0x2e823
0012fd74 7e418734 001303c8 00000113 001303c8 MSVBVM60!IID_IVbaHost+0x31220
0012fda0 7e418816 7347f5d1 001303c8 00000113 USER32!GetDC+0x6d
0012fe08 7e4189cd 00000000 7347f5d1 001303c8 USER32!GetDC+0x14f
0012fe68 7e4196c7 0012fe90 00000001 0012feb8 USER32!GetWindowLongW+0x127
0012fe78 7342a6b0 0012fe90 ffffffff 00ed372c USER32!DispatchMessageA+0xf
0012feb8 7342a627 ffffffff 00ed3754 00ed0000 MSVBVM60!_vbaStrToAnsi+0x2f1
0012fefc 7342a505 00ed3824 ffffffff 00000b58 MSVBVM60!_vbaStrToAnsi+0x268
7343a3b8 73426c73 7342756a 734e7ee7 734e7f12 MSVBVM60!_vbaStrToAnsi+0x146
734e6754 0c2474ff ff0c408b 8b0c2474 11ff5008 MSVBVM60!BASIC_CLASS_QueryInterface+0x17
0424448b 00000000 00000000 00000000 00000000 0xc2474ff
*----> Raw Stack Dump <----*
000000000012f55c  04 00 00 00 fc 70 ef 00 - 0c f6 12 00 44 39 ed 00  .....p......D9..
000000000012f56c  80 f5 12 00 99 e9 49 73 - c4 18 15 00 04 00 00 00  ......Is........
000000000012f57c  fc 70 ef 00 a4 f6 12 00 - 51 1d 48 73 fc 70 ef 00  .p......Q.Hs.p..
000000000012f58c  00 00 00 00 11 10 00 00 - 60 01 00 00 00 f6 12 00  ........`.......
000000000012f59c  02 00 00 00 e0 0d 43 73 - 17 6b 48 73 fc 70 ef 00  ......Cs.kHs.p..
000000000012f5ac  e0 0d 43 73 00 f6 12 00 - b8 f7 12 00 00 48 40 00  ..Cs.........H@.
000000000012f5bc  f5 26 64 00 00 00 00 00 - ec f5 12 00 00 00 00 00  .&d.............
000000000012f5cc  84 f7 12 00 ff bf ff ff - 00 00 00 00 00 00 00 00  ................
000000000012f5dc  80 df 13 00 7c 3e 61 c3 - 08 00 00 00 e2 73 94 1b  ....|>a......s..
000000000012f5ec  dc 0f 20 00 18 f6 12 00 - 88 19 15 00 10 00 00 00  .. .............
000000000012f5fc  17 00 00 00 03 00 00 00 - c4 18 15 00 04 00 00 00  ................
000000000012f60c  2c f6 12 00 b0 1d 15 00 - d0 e4 14 00 80 19 15 00  ,...............
000000000012f61c  68 01 14 00 00 00 00 00 - 00 00 00 00 80 19 15 00  h...............
000000000012f62c  b8 00 00 00 88 19 15 00 - 44 f6 12 00 78 01 14 00  ........D...x...
000000000012f63c  b8 00 00 00 52 00 00 00 - 00 00 14 00 40 f4 12 00  ....R.......@...
000000000012f64c  00 00 00 00 b8 f7 12 00 - 20 e9 90 7c d0 e4 14 00  ........ ..|....
000000000012f65c  d4 f6 12 00 74 f6 12 00 - 78 f6 12 00 d5 48 12 77  ....t...x....H.w
000000000012f66c  04 00 00 00 b8 f7 12 00 - 54 db 42 00 88 f6 12 00  ........T.B.....
000000000012f67c  5f 4c 12 77 54 db 42 00 - 04 00 00 00 a0 f6 12 00  _L.wT.B.........
000000000012f68c  a4 1f ed 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
*----> State Dump for Thread Id 0xfb4 <----*
eax=71a5d2c6 ebx=c0000000 ecx=7c912228 edx=ffffffff esi=00000000 edi=71a8793c
eip=7c90e514 esp=0210ff7c ebp=0210ffb4 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINNT\system32\ntdll.dll - 
function: ntdll!KiFastSystemCallRet
        7c90e4fa e829000000       call    ntdll!RtlRaiseException (7c90e528)
        7c90e4ff 8b0424           mov     eax,[esp]
        7c90e502 8be5             mov     esp,ebp
        7c90e504 5d               pop     ebp
        7c90e505 c3               ret
        7c90e506 8da42400000000   lea     esp,[esp]
        7c90e50d 8d4900           lea     ecx,[ecx]
        ntdll!KiFastSystemCall:
        7c90e510 8bd4             mov     edx,esp
        7c90e512 0f34             sysenter
        ntdll!KiFastSystemCallRet:
        7c90e514 c3               ret
        7c90e515 8da42400000000   lea     esp,[esp]
        7c90e51c 8d642400         lea     esp,[esp]
        ntdll!KiIntSystemCall:
        7c90e520 8d542408         lea     edx,[esp+0x8]
        7c90e524 cd2e             int     2e
        7c90e526 c3               ret
        7c90e527 90               nop
        ntdll!RtlRaiseException:
        7c90e528 55               push    ebp
        7c90e529 8bec             mov     ebp,esp
*----> Stack Back Trace <----*
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINNT\system32\kernel32.dll - 
WARNING: Stack unwind information not available. Following frames may be wrong.
ChildEBP RetAddr  Args to Child              
0210ffb4 7c80b729 71a5d65f 0012e30c 7c90e920 ntdll!KiFastSystemCallRet
0210ffec 00000000 71a5d2c6 001bb9b0 00000000 kernel32!GetModuleFileNameA+0x1ba
*----> Raw Stack Dump <----*
000000000210ff7c  4a da 90 7c 20 d3 a5 71 - 60 02 00 00 bc ff 10 02  J..| ..q`.......
000000000210ff8c  b0 ff 10 02 a4 ff 10 02 - 68 d3 a5 71 0c e3 12 00  ........h..q....
000000000210ff9c  20 e9 90 7c b0 b9 1b 00 - 00 00 00 00 00 00 00 00   ..|............
000000000210ffac  00 00 a5 71 a0 2f 6c 01 - ec ff 10 02 29 b7 80 7c  ...q./l.....)..|
000000000210ffbc  5f d6 a5 71 0c e3 12 00 - 20 e9 90 7c b0 b9 1b 00  _..q.... ..|....
000000000210ffcc  00 c0 fd 7f 00 c6 de 89 - c0 ff 10 02 48 c8 dd 88  ............H...
000000000210ffdc  ff ff ff ff d8 9a 83 7c - 30 b7 80 7c 00 00 00 00  .......|0..|....
000000000210ffec  00 00 00 00 00 00 00 00 - c6 d2 a5 71 b0 b9 1b 00  ...........q....
000000000210fffc  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000211000c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000211001c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000211002c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000211003c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000211004c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000211005c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000211006c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000211007c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000211008c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000211009c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
00000000021100ac  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
*----> State Dump for Thread Id 0xfac <----*
eax=000000c0 ebx=00000000 ecx=00000000 edx=00000000 esi=00000000 edi=00000001
eip=7c90e514 esp=0220fcec ebp=0220ffb4 iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
function: ntdll!KiFastSystemCallRet
        7c90e4fa e829000000       call    ntdll!RtlRaiseException (7c90e528)
        7c90e4ff 8b0424           mov     eax,[esp]
        7c90e502 8be5             mov     esp,ebp
        7c90e504 5d               pop     ebp
        7c90e505 c3               ret
        7c90e506 8da42400000000   lea     esp,[esp]
        7c90e50d 8d4900           lea     ecx,[ecx]
        ntdll!KiFastSystemCall:
        7c90e510 8bd4             mov     edx,esp
        7c90e512 0f34             sysenter
        ntdll!KiFastSystemCallRet:
        7c90e514 c3               ret
        7c90e515 8da42400000000   lea     esp,[esp]
        7c90e51c 8d642400         lea     esp,[esp]
        ntdll!KiIntSystemCall:
        7c90e520 8d542408         lea     edx,[esp+0x8]
        7c90e524 cd2e             int     2e
        7c90e526 c3               ret
        7c90e527 90               nop
        ntdll!RtlRaiseException:
        7c90e528 55               push    ebp
        7c90e529 8bec             mov     ebp,esp
*----> Stack Back Trace <----*
WARNING: Stack unwind information not available. Following frames may be wrong.
ChildEBP RetAddr  Args to Child              
0220ffb4 7c80b729 00000000 00910222 00000000 ntdll!KiFastSystemCallRet
0220ffec 00000000 7c92a3f3 00000000 00000000 kernel32!GetModuleFileNameA+0x1ba
*----> Raw Stack Dump <----*
000000000220fcec  4a df 90 7c 1a a5 92 7c - 14 00 00 00 30 fd 20 02  J..|...|....0. .
000000000220fcfc  01 00 00 00 01 00 00 00 - 00 00 00 00 22 02 91 00  ............"...
000000000220fd0c  00 00 00 00 00 00 00 00 - a0 f9 97 7c a0 f9 97 7c  ...........|...|
000000000220fd1c  7c 02 00 00 ac 0f 00 00 - 14 00 00 00 14 00 00 00  |...............
000000000220fd2c  13 00 00 00 78 02 00 00 - dc 01 00 00 b8 02 00 00  ....x...........
000000000220fd3c  c4 02 00 00 e0 02 00 00 - ec 02 00 00 f8 02 00 00  ................
000000000220fd4c  18 03 00 00 20 03 00 00 - 28 03 00 00 34 03 00 00  .... ...(...4...
000000000220fd5c  3c 03 00 00 48 03 00 00 - 54 03 00 00 60 03 00 00  <...H...T...`...
000000000220fd6c  68 03 00 00 74 03 00 00 - 80 03 00 00 8c 03 00 00  h...t...........
000000000220fd7c  94 03 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000220fd8c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000220fd9c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000220fdac  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000220fdbc  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000220fdcc  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000220fddc  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000220fdec  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000220fdfc  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000220fe0c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000220fe1c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
*----> State Dump for Thread Id 0xf0c <----*
eax=00000000 ebx=0230fef4 ecx=7ffda000 edx=76a613f0 esi=00000000 edi=7ffde000
eip=7c90e514 esp=0230fecc ebp=0230ff68 iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
function: ntdll!KiFastSystemCallRet
        7c90e4fa e829000000       call    ntdll!RtlRaiseException (7c90e528)
        7c90e4ff 8b0424           mov     eax,[esp]
        7c90e502 8be5             mov     esp,ebp
        7c90e504 5d               pop     ebp
        7c90e505 c3               ret
        7c90e506 8da42400000000   lea     esp,[esp]
        7c90e50d 8d4900           lea     ecx,[ecx]
        ntdll!KiFastSystemCall:
        7c90e510 8bd4             mov     edx,esp
        7c90e512 0f34             sysenter
        ntdll!KiFastSystemCallRet:
        7c90e514 c3               ret
        7c90e515 8da42400000000   lea     esp,[esp]
        7c90e51c 8d642400         lea     esp,[esp]
        ntdll!KiIntSystemCall:
        7c90e520 8d542408         lea     edx,[esp+0x8]
        7c90e524 cd2e             int     2e
        7c90e526 c3               ret
        7c90e527 90               nop
        ntdll!RtlRaiseException:
        7c90e528 55               push    ebp
        7c90e529 8bec             mov     ebp,esp
*----> Stack Back Trace <----*
WARNING: Stack unwind information not available. Following frames may be wrong.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINNT\system32\userenv.dll - 
ChildEBP RetAddr  Args to Child              
0230ff68 7c80a115 00000003 76a61348 00000000 ntdll!KiFastSystemCallRet
0230ff84 769c87bd 00000003 76a61348 00000000 kernel32!WaitForMultipleObjects+0x18
0230ffb4 7c80b729 00000000 00000000 00000000 userenv!RegisterGPNotification+0x1b6
0230ffec 00000000 769c8761 00000000 00000000 kernel32!GetModuleFileNameA+0x1ba
*----> Raw Stack Dump <----*
000000000230fecc  4a df 90 7c 90 95 80 7c - 03 00 00 00 f4 fe 30 02  J..|...|......0.
000000000230fedc  01 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000230feec  f0 13 a6 76 e7 9b 80 7c - c8 02 00 00 cc 02 00 00  ...v...|........
000000000230fefc  d0 02 00 00 5c fe 30 02 - 6c ff 30 02 6c ff 30 02  ....\.0.l.0.l.0.
000000000230ff0c  20 e9 90 7c 60 00 91 7c - 14 00 00 00 01 00 00 00   ..|`..|........
000000000230ff1c  00 00 00 00 00 00 00 00 - 10 00 00 00 fa 1b 80 7c  ...............|
000000000230ff2c  00 00 00 00 00 00 00 00 - 00 e0 fd 7f 00 a0 fd 7f  ................
000000000230ff3c  e8 d9 1f 00 00 00 00 00 - f4 fe 30 02 00 00 00 00  ..........0.....
000000000230ff4c  03 00 00 00 e8 fe 30 02 - 00 00 00 00 dc ff 30 02  ......0.......0.
000000000230ff5c  d8 9a 83 7c 80 96 80 7c - 00 00 00 00 84 ff 30 02  ...|...|......0.
000000000230ff6c  15 a1 80 7c 03 00 00 00 - 48 13 a6 76 00 00 00 00  ...|....H..v....
000000000230ff7c  ff ff ff ff 00 00 00 00 - b4 ff 30 02 bd 87 9c 76  ..........0....v
000000000230ff8c  03 00 00 00 48 13 a6 76 - 00 00 00 00 ff ff ff ff  ....H..v........
000000000230ff9c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 9c 76  ...............v
000000000230ffac  03 00 00 00 00 00 00 00 - ec ff 30 02 29 b7 80 7c  ..........0.)..|
000000000230ffbc  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
000000000230ffcc  00 a0 fd 7f 00 a6 de 89 - c0 ff 30 02 d0 1f bf 88  ..........0.....
000000000230ffdc  ff ff ff ff d8 9a 83 7c - 30 b7 80 7c 00 00 00 00  .......|0..|....
000000000230ffec  00 00 00 00 00 00 00 00 - 61 87 9c 76 00 00 00 00  ........a..v....
000000000230fffc  00 00 00 00 4d 5a 90 00 - 03 00 00 00 04 00 00 00  ....MZ..........
*----> State Dump for Thread Id 0x860 <----*
eax=00000000 ebx=00000000 ecx=001e9810 edx=ffffffff esi=00209ae0 edi=00000100
eip=7c90e514 esp=0297fe18 ebp=0297ff80 iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
function: ntdll!KiFastSystemCallRet
        7c90e4fa e829000000       call    ntdll!RtlRaiseException (7c90e528)
        7c90e4ff 8b0424           mov     eax,[esp]
        7c90e502 8be5             mov     esp,ebp
        7c90e504 5d               pop     ebp
        7c90e505 c3               ret
        7c90e506 8da42400000000   lea     esp,[esp]
        7c90e50d 8d4900           lea     ecx,[ecx]
        ntdll!KiFastSystemCall:
        7c90e510 8bd4             mov     edx,esp
        7c90e512 0f34             sysenter
        ntdll!KiFastSystemCallRet:
        7c90e514 c3               ret
        7c90e515 8da42400000000   lea     esp,[esp]
        7c90e51c 8d642400         lea     esp,[esp]
        ntdll!KiIntSystemCall:
        7c90e520 8d542408         lea     edx,[esp+0x8]
        7c90e524 cd2e             int     2e
        7c90e526 c3               ret
        7c90e527 90               nop
        ntdll!RtlRaiseException:
        7c90e528 55               push    ebp
        7c90e529 8bec             mov     ebp,esp
*----> Stack Back Trace <----*
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINNT\system32\RPCRT4.dll - 
WARNING: Stack unwind information not available. Following frames may be wrong.
ChildEBP RetAddr  Args to Child              
0297ff80 77e76caf 0297ffa8 77e76ad1 00209ae0 ntdll!KiFastSystemCallRet
0297ff88 77e76ad1 00209ae0 001fe2a8 0012e054 RPCRT4!I_RpcBCacheFree+0x61c
0297ffa8 77e76c97 001598a0 0297ffec 7c80b729 RPCRT4!I_RpcBCacheFree+0x43e
0297ffb4 7c80b729 001e9810 001fe2a8 0012e054 RPCRT4!I_RpcBCacheFree+0x604
0297ffec 00000000 77e76c7d 001e9810 00000000 kernel32!GetModuleFileNameA+0x1ba
*----> Raw Stack Dump <----*
000000000297fe18  aa da 90 7c e3 65 e7 77 - 58 02 00 00 74 ff 97 02  ...|.e.wX...t...
000000000297fe28  00 00 00 00 88 84 20 00 - 50 ff 97 02 00 00 00 00  ...... .P.......
000000000297fe38  30 28 df 89 5c cb e9 a7 - 00 c3 de 89 ed b6 54 80  0(..\.........T.
000000000297fe48  00 10 00 00 30 28 df 89 - 08 3d 02 89 04 00 00 01  ....0(...=......
000000000297fe58  00 00 00 00 00 00 00 00 - 20 3d 02 89 00 00 00 00  ........ =......
000000000297fe68  00 00 00 00 20 00 00 00 - 01 3d 02 89 00 00 00 00  .... ....=......
000000000297fe78  05 00 00 00 06 02 00 00 - a1 fc 4f 80 02 00 00 00  ..........O.....
000000000297fe88  24 cc e9 a7 09 00 00 00 - 42 b4 4f 80 02 00 00 00  $.......B.O.....
000000000297fe98  0a b2 4f 80 f6 cf d9 b9 - 43 7d 6e 80 28 cc e9 a7  ..O.....C}n.(...
000000000297fea8  27 74 6e 80 00 0d db ba - 00 00 00 00 9c 2a db b9  'tn..........*..
000000000297feb8  c0 d3 53 89 30 3f 01 e1 - 42 d0 d9 b9 14 cc e9 a7  ..S.0?..B.......
000000000297fec8  72 ba d8 b9 c0 d3 53 89 - 03 00 00 00 30 3f 01 e1  r.....S.....0?..
000000000297fed8  00 00 00 00 60 cc e9 a7 - 00 00 00 00 00 00 00 00  ....`...........
000000000297fee8  00 00 00 00 1f 00 00 00 - ff ff ff ff 40 05 34 ba  ............@.4.
000000000297fef8  00 00 00 00 10 74 6e 80 - bc 61 b0 88 28 cc e9 a7  .....tn..a..(...
000000000297ff08  00 00 00 00 27 74 6e 80 - 08 00 00 00 46 02 00 00  ....'tn.....F...
000000000297ff18  72 38 50 80 90 60 b0 88 - 20 60 b0 88 78 b0 4f 80  r8P..`.. `..x.O.
000000000297ff28  8c 61 b0 88 80 ff 97 02 - 85 d1 e7 77 48 ff 97 02  .a.........wH...
000000000297ff38  95 d1 e7 77 e0 10 90 7c - 78 99 20 00 10 98 1e 00  ...w...|x. .....
000000000297ff48  00 a2 2f 4d ff ff ff ff - 00 5d 1e ee ff ff ff ff  ../M.....]......
*----> State Dump for Thread Id 0xf2c <----*
eax=774fe4df ebx=00007530 ecx=7ffde000 edx=00211ab8 esi=00000000 edi=02a7ff50
eip=7c90e514 esp=02a7ff20 ebp=02a7ff78 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000206
function: ntdll!KiFastSystemCallRet
        7c90e4fa e829000000       call    ntdll!RtlRaiseException (7c90e528)
        7c90e4ff 8b0424           mov     eax,[esp]
        7c90e502 8be5             mov     esp,ebp
        7c90e504 5d               pop     ebp
        7c90e505 c3               ret
        7c90e506 8da42400000000   lea     esp,[esp]
        7c90e50d 8d4900           lea     ecx,[ecx]
        ntdll!KiFastSystemCall:
        7c90e510 8bd4             mov     edx,esp
        7c90e512 0f34             sysenter
        ntdll!KiFastSystemCallRet:
        7c90e514 c3               ret
        7c90e515 8da42400000000   lea     esp,[esp]
        7c90e51c 8d642400         lea     esp,[esp]
        ntdll!KiIntSystemCall:
        7c90e520 8d542408         lea     edx,[esp+0x8]
        7c90e524 cd2e             int     2e
        7c90e526 c3               ret
        7c90e527 90               nop
        ntdll!RtlRaiseException:
        7c90e528 55               push    ebp
        7c90e529 8bec             mov     ebp,esp
*----> Stack Back Trace <----*
WARNING: Stack unwind information not available. Following frames may be wrong.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINNT\system32\ole32.dll - 
ChildEBP RetAddr  Args to Child              
02a7ff78 7c802455 0000ea60 00000000 02a7ffb4 ntdll!KiFastSystemCallRet
02a7ff88 774fe3d3 0000ea60 0020b640 774fe492 kernel32!Sleep+0xf
02a7ffb4 7c80b729 0020b640 7c910435 001d3248 ole32!StringFromGUID2+0x51d
02a7ffec 00000000 774fe4df 0020b640 00000000 kernel32!GetModuleFileNameA+0x1ba
*----> Raw Stack Dump <----*
0000000002a7ff20  1a d2 90 7c f1 23 80 7c - 00 00 00 00 50 ff a7 02  ...|.#.|....P...
0000000002a7ff30  50 25 80 7c f8 7d 60 77 - 30 75 00 00 14 00 00 00  P%.|.}`w0u......
0000000002a7ff40  01 00 00 00 00 00 00 00 - 00 00 00 00 10 00 00 00  ................
0000000002a7ff50  00 ba 3c dc ff ff ff ff - 10 d1 4e 77 50 ff a7 02  ..<.......NwP...
0000000002a7ff60  30 ff a7 02 58 10 21 00 - dc ff a7 02 d8 9a 83 7c  0...X.!........|
0000000002a7ff70  60 24 80 7c 00 00 00 00 - 88 ff a7 02 55 24 80 7c  `$.|........U$.|
0000000002a7ff80  60 ea 00 00 00 00 00 00 - b4 ff a7 02 d3 e3 4f 77  `.............Ow
0000000002a7ff90  60 ea 00 00 40 b6 20 00 - 92 e4 4f 77 00 00 00 00  `...@. ...Ow....
0000000002a7ffa0  35 04 91 7c 40 b6 20 00 - 00 00 4e 77 fa e4 4f 77  5..|@. ...Nw..Ow
0000000002a7ffb0  48 32 1d 00 ec ff a7 02 - 29 b7 80 7c 40 b6 20 00  H2......)..|@. .
0000000002a7ffc0  35 04 91 7c 48 32 1d 00 - 40 b6 20 00 00 80 fd 7f  5..|H2..@. .....
0000000002a7ffd0  00 a6 de 89 c0 ff a7 02 - 90 93 57 89 ff ff ff ff  ..........W.....
0000000002a7ffe0  d8 9a 83 7c 30 b7 80 7c - 00 00 00 00 00 00 00 00  ...|0..|........
0000000002a7fff0  00 00 00 00 df e4 4f 77 - 40 b6 20 00 00 00 00 00  ......Ow@. .....
0000000002a80000  4d 5a 90 00 03 00 00 00 - 04 00 00 00 ff ff 00 00  MZ..............
0000000002a80010  b8 00 00 00 00 00 00 00 - 40 00 00 00 00 00 00 00  ........@.......
0000000002a80020  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0000000002a80030  00 00 00 00 00 00 00 00 - 00 00 00 00 e0 00 00 00  ................
0000000002a80040  0e 1f ba 0e 00 b4 09 cd - 21 b8 01 4c cd 21 54 68  ........!..L.!Th
0000000002a80050  69 73 20 70 72 6f 67 72 - 61 6d 20 63 61 6e 6e 6f  is program canno
*----> State Dump for Thread Id 0xcc4 <----*
eax=00000204 ebx=7c802530 ecx=0000021a edx=00000000 esi=000003c0 edi=00000000
eip=7c90e514 esp=02d2fd0c ebp=02d2fd70 iopl=0         nv up ei ng nz ac po cy
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000297
function: ntdll!KiFastSystemCallRet
        7c90e4fa e829000000       call    ntdll!RtlRaiseException (7c90e528)
        7c90e4ff 8b0424           mov     eax,[esp]
        7c90e502 8be5             mov     esp,ebp
        7c90e504 5d               pop     ebp
        7c90e505 c3               ret
        7c90e506 8da42400000000   lea     esp,[esp]
        7c90e50d 8d4900           lea     ecx,[ecx]
        ntdll!KiFastSystemCall:
        7c90e510 8bd4             mov     edx,esp
        7c90e512 0f34             sysenter
        ntdll!KiFastSystemCallRet:
        7c90e514 c3               ret
        7c90e515 8da42400000000   lea     esp,[esp]
        7c90e51c 8d642400         lea     esp,[esp]
        ntdll!KiIntSystemCall:
        7c90e520 8d542408         lea     edx,[esp+0x8]
        7c90e524 cd2e             int     2e
        7c90e526 c3               ret
        7c90e527 90               nop
        ntdll!RtlRaiseException:
        7c90e528 55               push    ebp
        7c90e529 8bec             mov     ebp,esp
*----> Stack Back Trace <----*
WARNING: Stack unwind information not available. Following frames may be wrong.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINNT\system32\comsvcs.dll - 
ChildEBP RetAddr  Args to Child              
02d2fd70 7c802542 000003c0 00002710 00000000 ntdll!KiFastSystemCallRet
02d2fd84 76663ba1 000003c0 00002710 7c9121b4 kernel32!WaitForSingleObject+0x12
02d2ffb4 7c80b729 0020afac 7c9121b4 7c912221 comsvcs!DispManGetContext+0x29c
02d2ffec 00000000 76663aaf 0020afac 00000000 kernel32!GetModuleFileNameA+0x1ba
*----> Raw Stack Dump <----*
0000000002d2fd0c  5a df 90 7c db 25 80 7c - c0 03 00 00 00 00 00 00  Z..|.%.|........
0000000002d2fd1c  40 fd d2 02 00 00 00 00 - ac af 20 00 30 25 80 7c  @......... .0%.|
0000000002d2fd2c  14 00 00 00 01 00 00 00 - 00 00 00 00 00 00 00 00  ................
0000000002d2fd3c  10 00 00 00 00 1f 0a fa - ff ff ff ff 00 e0 fd 7f  ................
0000000002d2fd4c  00 70 fd 7f 40 fd d2 02 - 00 00 00 00 20 fd d2 02  .p..@....... ...
0000000002d2fd5c  84 fd d2 02 dc ff d2 02 - d8 9a 83 7c 08 26 80 7c  ...........|.&.|
0000000002d2fd6c  00 00 00 00 84 fd d2 02 - 42 25 80 7c c0 03 00 00  ........B%.|....
0000000002d2fd7c  10 27 00 00 00 00 00 00 - b4 ff d2 02 a1 3b 66 76  .'...........;fv
0000000002d2fd8c  c0 03 00 00 10 27 00 00 - b4 21 91 7c 21 22 91 7c  .....'...!.|!".|
0000000002d2fd9c  ac af 20 00 00 00 62 76 - 00 00 00 00 43 00 3a 00  .. ...bv....C.:.
0000000002d2fdac  5c 00 57 00 49 00 4e 00 - 4e 00 54 00 5c 00 73 00  \.W.I.N.N.T.\.s.
0000000002d2fdbc  79 00 73 00 74 00 65 00 - 6d 00 33 00 32 00 5c 00  y.s.t.e.m.3.2.\.
0000000002d2fdcc  63 00 6f 00 6d 00 73 00 - 76 00 63 00 73 00 2e 00  c.o.m.s.v.c.s...
0000000002d2fddc  64 00 6c 00 6c 00 00 00 - 39 8a 00 00 f9 06 81 7c  d.l.l...9......|
0000000002d2fdec  1b 00 00 00 00 02 00 00 - fc ff d2 02 23 00 00 00  ............#...
0000000002d2fdfc  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0000000002d2fe0c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0000000002d2fe1c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0000000002d2fe2c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0000000002d2fe3c  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................

Has the "IsWow64Process" method changed lately - RE: How to check whether the system is 32 bit or 64 bit ?

$
0
0

Hi,

I am using the forum's recommended way (http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/24792cdc-2d8e-454b-9c68-31a19892ca53/) of detecting a 32-bit program running under Wow64 on a 64-bit Vista system, and it used to work - it reported a 32-bit process running under Wow64 on a 64-bit system.  After a couple of months (I don't know exaclty when), this method is now reporting that - when I compile my class as x86 (32-bit) in Visual Studio 2010 SP1 - the method IsWow64Process does not exist in Kernel32.dll.  I am running Windows Vista Ultimate SP2 on a 64-bit HP PC.  I first check if the IntPtr is 8 bits - which it isn't because I have a 32-bit process.  Then I check if the Kernel32.dll is present - it is.  Then I check if the IsWow64Process method is present in Kernetl32.dll - and it is NOT.  I am positive this used to work a couple of months ago.  I moved the methods to a separate class (NativeMethods) to satisfy the Code Analysis tool, but no other changes were made.  If I compile the classe as x64, then the same code reports a 64-bit process because the IntPtr is 8 bits big.

Code extract:

{

 // The Kernelt32.dll module which can contain the "IsWow64Process" method exists.  Now see if the method "IsWow64Process" exists in this module.
                    IntPtr methodHandle = GetProcAddress(moduleHandle, "IsWow64Process");
                    if (methodHandle == IntPtr.Zero)
                    {
                        // The method "IsWow64Process" does not exist, so we are running on a 32-bit system.  This is NOT true as I am running on a 64-bit machine.
                        // Set the system architecture.
                        systemArch = "32-bit";
                    }
                    else
                    { // code which should be reached but is not... }
}

Can the way Visual Studio is told to compile (32 or 64 bit, AnyCPU, Target Platform) affect the way this works ?

Any help appreciated.

Thanks and regards

Keith


DynamicMethod disassembling

$
0
0

I'm currently evaluating the power of DynamicMethod to create an environment that based on user input can create more or less volatile methods.

The user input finally forming these methods may be buggy and throw exceptions.

There's a ton of questions that arise from this fact since it virtually seems to be impossible to support users where their error is. I would like to know how Dynamic method compilation internally works and what exactly the reasons are for omitting tables containing IL to native sequence point mappings in the .NET framework when working with dynamic methods.

I've also been experimenting with dynamic types concerning the scenario and found it unlikely that we can use them. Reason 1 is that the customer induced hosting platform for the project may not even support .NET 4.0, so getting rid again of the method code may be virtually impossible. Running different Appdomains is out of the question because of performance reasons. Reason 2: The memory overhead induced by loading tons of dynamic assemblies (and in worst case additionally AppDomains even) would kill the project anyway, since the dynamically generated code may be long living.

When evaluating the possibilities, I also noticed that is is impossible to step into the native machine code generated by the JIT-compiler for a dynamic method. I. e. you can't even have a look at the code you just generated from the IL you emitted. Why is that so?

Furthermore, emitting the same IL through ILGenerators from DynamicMethod and a MethodBuilder seems to lead to different byte code. The differences seem to be in the encoding of addresses for methods we called from within the emitted IL (In a test simply Console.WriteLine - two different encodings for the same OpCodes.Call). That was where I really lost it. I would like to have more information about what is happening there and why this should be the case at all.

The best way to realize the planned environment would be to precompile the dynamic method code just as the IL byte-array and serialize it to disk (or maybe even put it in a database) and only recompile when the user input file has changed. When the functionality is needed, the dynamicmethod would be quickly instantiated from the saved IL-byte-array. However, regarding the aforementioned issue, I am quite uncertain whether that would work. If the method addresses change on a restart of the environment, things would simply break. What do the emitted addresses depend on? The loaded assemblies? Their order of loading?

Next question: Is there a guarantee that the JITted code for a static 'DynamicType' method (generated by a MethodBuilder (maybe even with sequence points)) and a (also static) DynamicMethod will be the same if they based on the same IL code? Is there a possibility to access the Native-to-IL mapping of the MethodBuilder method? If so, this could be a workaround to map the native offset when an exception occurs (the only information you seem to be able to obtain for an exception in a DynamicMethod) to the IL that was generated.

I would appreciate direct feedback from Microsoft clarifying these points.

Following is some example code we used for evaluation:

using System;
using System.Text;
using System.Reflection;
using System.Reflection.Emit;
using System.Diagnostics;
using System.Diagnostics.SymbolStore;


namespace test
{
    class MainClass
    {
        internal delegate int callconv(int i);

        public static void Main(string[] args)
        {
            try
            {
                Assembly asm = AppDomain.CurrentDomain.GetAssemblies()[0];
                Module mod = asm.GetModules()[0];
                AssemblyBuilder asmb = AppDomain.CurrentDomain.DefineDynamicAssembly(new AssemblyName("test"), AssemblyBuilderAccess.RunAndSave);
                ModuleBuilder modb = asmb.DefineDynamicModule("test", @"TestAssembly.dll", true);
                ISymbolDocumentWriter doc = modb.DefineDocument(@"F:\fantasy\path\mymodule.xlg", Guid.Empty, Guid.Empty, Guid.Empty);
                TypeBuilder typb = modb.DefineType("test");
                MethodBuilder mb = typb.DefineMethod("tesmeth", MethodAttributes.Static | MethodAttributes.Public,
                            CallingConventions.Standard, typeof(int), new Type[] { typeof(int) });
                DynamicMethod x = new DynamicMethod("test", MethodAttributes.Public | MethodAttributes.Static, CallingConventions.Standard, typeof(int), new Type[] { typeof(int) }, modb, true);
                MethodInfo writelineint = typeof(Console).GetMethod("WriteLine", new Type[] { typeof(string), typeof(object) });
                ILGenerator ilg = x.GetILGenerator();
                //ilg.MarkSequencePoint(doc, 1, 2, 1, 32);
                ilg.Emit(OpCodes.Ldc_I4_4);
                ilg.Emit(OpCodes.Ldarg_0);
                ilg.Emit(OpCodes.Ldc_I4_2);
                ilg.Emit(OpCodes.Call, typeof(Console).GetMethod("WriteLine", new Type[] { typeof(int) }));
                ilg.Emit(OpCodes.Ldc_I4_3);
                ilg.Emit(OpCodes.Call, typeof(Console).GetMethod("WriteLine", new Type[] { typeof(int) }));
                //ilg.MarkSequencePoint(doc, 5, 2, 5, 32);
                ilg.Emit(OpCodes.Div);
                //ilg.MarkSequencePoint(doc, 7, 2, 7, 32);
                ilg.Emit(OpCodes.Box, typeof(int));
                ilg.Emit(OpCodes.Starg, 0);
                ilg.Emit(OpCodes.Ldstr, String.Intern("testres={0}"));
                ilg.Emit(OpCodes.Ldarg_0);
                ilg.Emit(OpCodes.Call, writelineint);
                ilg.Emit(OpCodes.Ldarg_0);
                ilg.Emit(OpCodes.Unbox, typeof(int));
                ilg.Emit(OpCodes.Ldobj, typeof(int));
                ilg.Emit(OpCodes.Ret);
                FieldInfo ilpropCode = ilg.GetType().GetField("m_ILStream", BindingFlags.Instance | BindingFlags.NonPublic);
                FieldInfo ilpropCodeLength = ilg.GetType().GetField("m_length", BindingFlags.Instance | BindingFlags.NonPublic);
                byte[] bytes = (byte[])ilpropCode.GetValue(ilg);
                int length = (int)ilpropCodeLength.GetValue(ilg);
                byte[] byIL = new byte[length];
                Array.Copy(bytes, byIL, length);
                object[] ats = x.GetCustomAttributes(true);

                callconv meth = (callconv)(x.CreateDelegate(typeof(callconv)));
                meth(2);
                Console.WriteLine("exec: {0}", meth(1));  // change to 0 here to get an exception for the dynamic method

                mb.DefineParameter(1, ParameterAttributes.In, "invalue");
                ilg = mb.GetILGenerator();
                ilg.MarkSequencePoint(doc, 2, 2, 2, 32);
                ilg.Emit(OpCodes.Ldc_I4_4);
                ilg.MarkSequencePoint(doc, 3, 2, 3, 32);
                ilg.Emit(OpCodes.Ldarg_0);
                ilg.Emit(OpCodes.Ldc_I4_2);
                ilg.Emit(OpCodes.Call, typeof(Console).GetMethod("WriteLine", new Type[] { typeof(int) }));
                ilg.Emit(OpCodes.Ldc_I4_3);
                ilg.Emit(OpCodes.Call, typeof(Console).GetMethod("WriteLine", new Type[] { typeof(int) }));
                ilg.MarkSequencePoint(doc, 5, 2, 5, 32);
                ilg.Emit(OpCodes.Div);
                ilg.MarkSequencePoint(doc, 7, 2, 7, 32);
                ilg.Emit(OpCodes.Box, typeof(int));
                ilg.Emit(OpCodes.Starg, 0);
                ilg.Emit(OpCodes.Ldstr, String.Intern("testres={0}"));
                ilg.Emit(OpCodes.Ldarg_0);
                ilg.Emit(OpCodes.Call, writelineint);
                ilg.Emit(OpCodes.Ldarg_0);
                ilg.Emit(OpCodes.Unbox, typeof(int));
                ilg.Emit(OpCodes.Ldobj, typeof(int));
                ilg.Emit(OpCodes.Ret);

                //mb.CreateMethodBody(byIL, byIL.Length);  // this will fail horribly
                Type typ = typb.CreateType();

                ilpropCode = ilg.GetType().GetField("m_ILStream", BindingFlags.Instance | BindingFlags.NonPublic);
                ilpropCodeLength = ilg.GetType().GetField("m_length", BindingFlags.Instance | BindingFlags.NonPublic);
                bytes = (byte[])ilpropCode.GetValue(ilg); // x.GetMethodBody().GetILAsByteArray(); // (byte[])getter.Invoke(d, null);
                length = (int)ilpropCodeLength.GetValue(ilg);
                byte[] byIL2 = new byte[length];
                Array.Copy(bytes, byIL2, length);

                if (!System.Linq.Enumerable.SequenceEqual<byte>(byIL, byIL2))
                {
                    Console.WriteLine("Code still differs!");
                }
                else
                {
                    Console.WriteLine("Equal code.");
                }

                MethodInfo mi = typ.GetMethod("tesmeth");

                callconv meth2 = (callconv)Delegate.CreateDelegate(typeof(callconv), mi);
                meth2(2);
                ats = meth2.Method.GetCustomAttributes(true);
                foreach (object o in ats)
                {
                    Console.WriteLine(o.ToString());
                }
                Console.WriteLine("exec2: {0}", meth2(0));


            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                StackTrace trc = new StackTrace(ex, true);
                StackFrame sf = trc.GetFrames()[0];

                Console.WriteLine("meth:{2}, nat:{0}, il:{1}", sf.GetNativeOffset(), sf.GetILOffset(), sf.GetMethod().Name);
            }

            Console.ReadKey(true);
        }
    }
}




Error invoking constructor using reflection

$
0
0

I have 

public class A{}
public class B
    {
        A a;
        public B(A a)
        {
            this.a =a;
        }
}

Now i am trying to invoke constructor of B using reflection.

A a = new A();
var type = typeof(B);
var ctr = type.GetConstructor(new []{typeof(A)});
var instance = ctr.Invoke(new Object[] { a });
Console.Out.Write(null != instance);

This runs fine in my local system however failing in the build server(using NAnt) and giving me an exception

System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
  ----> System.InvalidProgramException : Common Language Runtime detected an invalid program.
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
at Program..ctr(A a) in Program.cs:line 20
--InvalidProgramException

Any idea whats going wrong here and how can i debug further ?

IIS fails to load an assembly from the App Base folder &quot;Web Site&#39;s Bin&quot; folder. Exception (with Fusion Log Details) shows AppBase is set to &quot;C:/Windows/SysWOW64/inetsrv/

$
0
0

Our web site is hosted in IIS with an AppPool set to run as a specific user account. When we directly refer to one of our managed assembly, no errors and the assembly is loaded ok. But the same assembly when referred to from the Mixed code (C++ code) throws the following exception

Could not load file or assembly 'MyDll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=a348e42a78edea73' or one of its dependencies. The system cannot find the file specified.

Fusion Details show

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = CRC.XMLInterfaces, Version=0.0.0.0, Culture=neutral, PublicKeyToken=a348e42a78edea73
(Fully-specified)
LOG: Appbase = file:///C:/Windows/SysWOW64/inetsrv/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: CRC.XMLInterfaces, Version=0.0.0.0, Culture=neutral, PublicKeyToken=a348e42a78edea73
LOG: Attempting download of new URL file:///C:/Windows/SysWOW64/inetsrv/CRC.XMLInterfaces.DLL.
LOG: Attempting download of new URL file:///C:/Windows/SysWOW64/inetsrv/CRC.XMLInterfaces/CRC.XMLInterfaces.DLL.
LOG: Attempting download of new URL file:///C:/Windows/SysWOW64/inetsrv/CRC.XMLInterfaces.EXE.
LOG: Attempting download of new URL file:///C:/Windows/SysWOW64/inetsrv/CRC.XMLInterfaces/CRC.XMLInterfaces.EXE.

Not sure why "AppBase" is set to inetsrv folder. Is there any way to force set the AppBase folder when loading from the mixed mode code. Same web site works perfectly fine on Windows Server 2008 R2. Problems started happening trying on Windows Server 2012.

Thanks

Problem with IMetaDataEmit::Merge()

$
0
0

Hi,
I am trying to instrument methods in mscorlib.dll and put method calls into my own proxy methods into them. Now, I know I cannot add AssemblyRefs from mscorlib.dll to my proxy.dll because mscorlib does not like that in SingleDomain mode.
So, I want to merge all the content of proxy.dll (all typedefs, methods, methodbodies, ect) into mscorlib.dll. It is very similar to what has been discussed in http://social.msdn.microsoft.com/Forums/en-US/0338c6bf-81b5-44ff-8e43-8bdb9a44feb7/modify-systemexception-in-setilfunctionbody

I tried IMetaDataEmit::Merge() to inject all metadata into mscorlib.dll (at ModuleLoadStarted/Finished profiler callback). However, I could not get it to work yet. Documentation is very sparse on that topic. My problem is that I get a AccessViolation when I call MergeEnd:

  clr.dll!CMiniMdRW::GetFilterTable(void)     Unknown
  clr.dll!NEWMERGER::Merge(enum MergeFlags,enum CorRefToDefCheck)     Unknown
  clr.dll!RegMeta::MergeEnd(void)     Unknown

Here is the disassebly from the debugger:

CMiniMdRW::GetFilterTable:
    000007FEE8A7FA5C  mov         qword ptr [rsp+8],rbx 
    000007FEE8A7FA61  push        rdi 
    000007FEE8A7FA62  sub         rsp,20h 
    000007FEE8A7FA66  xor         ebx,ebx 
    000007FEE8A7FA68  mov         rdi,rcx 
--> 000007FEE8A7FA6B  cmp         qword ptr [rcx+18A0h],rbx 
    000007FEE8A7FA72  je          CMiniMdRW::GetFilterTable+0C5Eh (07FEE8A806BAh) 
    000007FEE8A7FA78  mov         rax,qword ptr [rdi+18A0h] 
    000007FEE8A7FA7F  mov         rbx,qword ptr [rsp+30h] 
    000007FEE8A7FA84  add         rsp,20h 
    000007FEE8A7FA88  pop         rdi 
    000007FEE8A7FA89  ret 
    000007FEE8A7FA8A  nop 
    000007FEE8A7FA8B  nop 

rcx is 0. That means that the this-pointer is NULL, if I interpret it correctly.

This is what I do in ModuleLoadFinished callback (simplified):

// open scope and IMetaDataImport for proxy.dll which is loaded as raw file
IMetaDataDispenserEx *pDisp;
CoCreateInstance(CLSID_CorMetaDataDispenser, NULL, CLSCTX_INPROC_SERVER, IID_IMetaDataDispenserEx, (void **)&pDisp);
IMetaDataImport   *pImport;
pDisp->OpenScopeOnMemory(pFileInMemory, fileSize, ofRead, IID_IMetaDataImport, (LPUNKNOWN*)&pImport);

// get IMetaDataEmit for mscorlib.dll
IMetaDataEmit2 * pEmit2;
corProfilerInfo->GetModuleMetaData(moduleId, ( DWORD)( ofWrite | ofRead), IID_IMetaDataEmit2, (IUnknown **) &pEmit2);

// do the merge
MyTokenMapper mapper; // dummy mapper which implements IMapToken
MyErrorHandler handler; // implements IUnknown, not sure what this one is supposed to do
emit->Merge(import, &mapper, &handler);
emit->MergeEnd(); // here, the crash happens

Can anyone tell me:
 1. Why does it crash? What can I do differently?
 2. I implemented IMapToken myself, but I do not get any callbacks to ::Map(). Isn't it supposed to give me a callback for each merge?
 3. Is it recommended to use ::Merge() at all? Or would it be more wise to use IMetaDataEmit::Define...() and do the merge one by one?

Thanks!
-Christoph




Web Hosting?

$
0
0
Hi people,

How do I find out where my company's website is being hosted and how do I add another site. I am the only developer here and I inherited this company's website when I accepted this position. I need to clone a section of a working, but not active, section and rename it for a specific client. I need to make active "http://www.widget.com/JCIBid/Login.aspx" for example. I assume I start with IIS 6 but I am not sure.

BlueMarker
Viewing all 1710 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>