Phoenix ForumDiscuss and ask questions about the Phoenix Research Development Kit, including installation, setup, tutorials and other general Phoenix questions.© 2009 Microsoft Corporation. All rights reserved.Wed, 25 Nov 2009 15:25:36 Z2d169e63-f843-415d-91e7-b5fba6859f0dhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/2085fa72-19d8-4a6b-b6e0-8777e4fbfc59http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/2085fa72-19d8-4a6b-b6e0-8777e4fbfc59Anil Revuruhttp://social.msdn.microsoft.com/Profile/en-US/?user=Anil%20RevuruPEModuleUnit.LoadGlobalSymbols is throwing exception on Windows 7 machineWhen we use peModuleUnit.LoadGlobalSymbols() it throws the following error.<br/><br/>The available PDB has been stripped so it does not contain the required<br/>information for native or IJW images.<br/>Please find the full PDB for this binary and re-run your scenario.<br/><br/>Unhandled Exception: System.AccessViolationException: Attempted to read or write<br/>protected memory. This is often an indication that other memory is corrupt.<br/>at Phx.Pdb.ReaderImplementation.GetDataStream(String sectionNameString)<br/>at Phx.PE.ReaderPhase.ReadPEFixups()<br/>at Phx.PE.ReaderPhase.SeedFixups()<br/>at Phx.PE.ReaderPhase.CodeDiscovery()<br/>at Phx.PE.ReaderPhase.Translate()<br/>at Phx.PEModuleUnit.LoadGlobalSymbols()<br/><br/>We have tested the same code on Windows Server 2003 and it is working fine, its generating this error on Windows 7 and Windows 2008 machines.<br/><br/>Thanks in Advance<br/>AnilFri, 20 Nov 2009 22:06:20 Z2009-11-25T15:25:35Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/6dc061b2-709a-4d1d-b010-edc4a7b309aehttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/6dc061b2-709a-4d1d-b010-edc4a7b309aeketnethttp://social.msdn.microsoft.com/Profile/en-US/?user=ketnetdebug phoenix using VS 2008hi<br/> <br/> I'm a starter at phoenix and I'm trying to run the debugger.<br/> <br/> 1ste<br/> i start visual studio from the phoenix debug command prompt (I use the devenv instruction)<br/> <br/> 2de<br/> I set up the debug property<br/> <br/> start external program: C:\Program Files\Phoenix SDK June 2008\bin\debug\x86\cl.exe<br/> start options: hello.c -d2plugin:&quot;G:\My Documents\Phoenix SDK June 2008\return_adr\return_adr\bin\Debug\return_adr.dll&quot; <br/> working directory: G:\My Documents\Phoenix SDK June 2008\hello world\<br/> <br/> the file i want to compile is hello.c this file can be found at the working directory <br/> my plugin i want to debug is return_adr.dll and can be found at &quot;G:\My Documents\Phoenix SDK June 2008\return_adr\return_adr\bin\Debug\return_adr.dll&quot; <br/> <br/> 3de<br/> I've set up some breakpoints within the Execute function<br/> <br/> 4the <br/> I hit F5<br/> <br/> 5the<br/> Visual studio starts but exits almost immediately with this as output<br/> <br/> 'cl.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.<br/> 'cl.exe' (Managed): Loaded 'C:\Program Files\Phoenix SDK June 2008\bin\debug\x86\c2.dll', Symbols loaded.<br/> 'cl.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\phxd\0.64.30627.0__31bf3856ad364e35\phxd.dll'<br/> 'cl.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.<br/> 'cl.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\runtime-vccrt-win32-x86d\0.64.30627.0__31bf3856ad364e35\runtime-vccrt-win32-x86d.dll'<br/> 'cl.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\architecture-x86d\0.64.30627.0__31bf3856ad364e35\architecture-x86d.dll'<br/> 'cl.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\runtime-vccrt-win-msild\0.64.30627.0__31bf3856ad364e35\runtime-vccrt-win-msild.dll'<br/> 'cl.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\architecture-msild\0.64.30627.0__31bf3856ad364e35\architecture-msild.dll'<br/> 'cl.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.<br/> 'cl.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.<br/> The program '[7340] cl.exe: Managed' has exited with code 1 (0x1).<br/> <br/> Does anyone now where I've gone wrong?<br/> Thanks Kenneth<br/> <br/>Wed, 25 Nov 2009 09:55:15 Z2009-11-25T09:55:16Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/ed91ef0b-8a82-4574-b88b-5479b0361a5ehttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/ed91ef0b-8a82-4574-b88b-5479b0361a5eketnethttp://social.msdn.microsoft.com/Profile/en-US/?user=ketnetbranch problemMy problem is that i want to replace this instruction:<br/>    {&amp;ESP:ESP}        = ret {&amp;ESP:ESP}, $L10(T)                              #10<br/> <br/> by this function<br/> pop ecx<br/> //and ecx,0xffffffff (implement at a later time<br/> jmp ecx<br/> <br/> the problem i'm having is with the branch instruction, The function requires a label to the location i want to jump to but i don't have a label only the conntent of the ecx register. how can i jump to this location.<br/> Phx.IR.Instruction branchInstruction = Phx.IR.BranchInstruction.New(functionUnit,Phx.Targets.Architectures.X86.Opcode.jmp, LABEL);<br/> <br/> LABEL needs to be content of ECX register<br/> <br/> <br/> code so far: <div style="color:Black;background-color:White"> <pre> <span style="color:Blue">foreach</span> (Phx.IR.Instruction instruction <span style="color:Blue">in</span> Phx.IR.Instruction.Iterator(functionUnit))<br/> {<br/> <span style="color:Blue">if</span> (Phx.Common.Opcode.Return == instruction.Opcode) <br/> {<br/> <span style="color:Green">//zou niet zichtbaar mogen worden als reader op juist moment start (IR code geen LIR)</span> Phx.Output.WriteLine(<span style="color:#a31515">&quot;seen return:&quot;</span> );<br/> }<br/> <span style="color:Blue">if</span> (Phx.Targets.Architectures.X86.Opcode.ret == instruction.Opcode) <br/> {<br/> Phx.Output.WriteLine(<span style="color:#a31515">&quot;seen return X86:&quot;</span> );<br/> Phx.Output.WriteLine(<span style="color:#a31515">&quot;return:&quot;</span> );<br/> Phx.Output.WriteLine(instruction.ExpressionToString());<br/> <span style="color:Green">// ** Generate pop ECX ** </span> Phx.IR.Instruction popInstruction = Phx.IR.ValueInstruction.New(functionUnit, Phx.Targets.Architectures.X86.Opcode.pop); <span style="color:Green">// Add ECX as the source operand </span> Phx.Types.Type registerType = functionUnit.RegisterIntType; Phx.IR.Operand ecxOperand = Phx.IR.VariableOperand.NewRegister(functionUnit, registerType, Phx.Targets.Architectures.X86.Register.ECX); popInstruction.AppendSource(ecxOperand); <span style="color:Green">// Add the esp side effect; esp is modified by pop </span> <span style="color:Blue">int</span> registerTag = functionUnit.AliasInfo.GetTag(Phx.Targets.Architectures.X86.Register.ESP); <br/> popInstruction.AppendDestination(Phx.IR.AliasOperand.New(functionUnit, registerTag)); <br/> <span style="color:Green">// Now add the store side effect. The store is aligned, accesses memory that is not otherwise </span> <span style="color:Green">// aliased, and will not cause an exception. </span> Phx.IR.VariableOperand espOperand = Phx.IR.VariableOperand.NewRegister(functionUnit, registerType, Phx.Targets.Architectures.X86.Register.ESP); Phx.IR.MemoryOperand memoryEspOperand = Phx.IR.MemoryOperand.New(functionUnit, registerType, <span style="color:Blue">null</span> , espOperand, 0, Phx.Alignment.NaturalAlignment(registerType), <br/> functionUnit.AliasInfo.NotAliasedMemoryTag, functionUnit.SafetyInfo.SafeTag); <br/> popInstruction.AppendDestination(memoryEspOperand); <br/> <span style="color:Green">// Verify we have created a &quot;legal&quot; instruction....and dump what we've created. </span> <span style="color:Blue">bool</span> isLegal = functionUnit.Legalize.IsLegal(popInstruction); <br/> <span style="color:Blue">if</span> (isLegal) Console.WriteLine(<span style="color:#a31515">&quot;popInstruction is in legal form.&quot;</span> ); <br/> <span style="color:Green">//create jmp</span> Phx.IR.Instruction branchInstruction = Phx.IR.BranchInstruction.New(functionUnit,Phx.Targets.Architectures.X86.Opcode.jmp, <strong>LABEL</strong> );<br/> <br/> <br/> <span style="color:Green">// Verify we have created a &quot;legal&quot; instruction....and dump what we've created. </span> <span style="color:Blue">bool</span> isLegal2 = functionUnit.Legalize.IsLegal(branchInstruction); <br/> <span style="color:Blue">if</span> (isLegal2) Console.WriteLine(<span style="color:#a31515">&quot;branchInstruction is in legal form.&quot;</span> ); <br/> <br/> <br/> <br/> instruction.InsertBefore(popInstruction);<br/> <span style="color:Green">//instruction.InsertBefore(andInstruction);</span> instruction.Replace(branchInstruction); } } </pre> </div> <br/>Tue, 24 Nov 2009 12:58:05 Z2009-11-24T12:58:06Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/a62b72ad-8351-4302-9fcd-bcab7f9ddd46http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/a62b72ad-8351-4302-9fcd-bcab7f9ddd46ketnethttp://social.msdn.microsoft.com/Profile/en-US/?user=ketnetvariable creation &lt;!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:&quot;&quot;; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:&quot;Times New Roman&quot;; mso-fareast-font-family:&quot;Times New Roman&quot;;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} --&gt; <p class=MsoNormal><span style="font-size:8pt">I'm currently working on a plug-in where I add code in the IR of the phoenix compiler after the CxxIL Reader phase. </span></p> <p class=MsoNormal><span style="font-size:8pt">I know how I can add IR instructions:<br/> instruction.InsertAfter(Phx.IR.ValueInstruction.New(functionUnit, Phx.Common.Opcode.Nop));<br/> <br/> what I would like to know is how can I create a variable in Phoenix and insert it into the existing code. </span></p> <p class=MsoNormal><span style="font-size:8pt"> </span></p> <p class=MsoNormal><span style="font-size:8pt">To give a more detailed example I would like to create a copy from the variable _one visible in the IR dump below and safe the value in a new variable. Does anyone knows how to doe this.</span></p> <p class=MsoNormal> </p> <p class=MsoNormal> <pre lang=x-cpp>IR after CxxIL Reader (control cil) Function Unit #1 $L1: (references=0) #1 {*StaticTag}, {*NotAliasedTag} = START _main(T) #1 _main: (references=1) #1 ENTERFUNCTION #1 ENTERBLOCK ScopeSymbol276 #1 ENTERBLOCK #1 ENTERBLOCK ScopeSymbol278 #1 _one = ASSIGN 1 #4 t280 = ADD _one, 1 #5 _two = ASSIGN t280 #5 t282 = CONVERT &amp;$SG734 #6 {*CallTag} = CALL* &amp;_printf, t282, {*CallTag}, $L5(EH) #6 t285 = CONVERT &amp;$SG735 #7 {*CallTag} = CALL* &amp;_printf, t285, _one, {*CallTag}, $L5(EH) #7 t288 = CONVERT &amp;$SG736 #8 {*CallTag} = CALL* &amp;_printf, t288, _two, {*CallTag}, $L5(EH) #8 EXITBLOCK ScopeSymbol278 #10 EXITBLOCK #10 EXITBLOCK ScopeSymbol276 #10 RETURN 0, $L3(T) #10* $L5: (references=3) #10 UNWIND #10 $L3: (references=1) #10 EXITFUNCTION #10 $L2: (references=0) #10 END {*StaticTag} #10</pre> <span style="font-size:8pt"></span></p> <span style="font-size:8pt"></span>Wed, 18 Nov 2009 15:02:00 Z2009-11-18T15:02:00Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/40a483a0-7db7-476d-94e2-1674cb777d31http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/40a483a0-7db7-476d-94e2-1674cb777d31dascripterhttp://social.msdn.microsoft.com/Profile/en-US/?user=dascripterString TypesHow do I go about creating a string type in Phoenix.  I am writing a compiler for a small language called Tiger and I need to be able to add support for strings.  I had thought of simply putting them into some string section at compile time, but that does not handle user input.  Any help would be greatly appreciated.<br/> <br/> DrewSat, 14 Nov 2009 03:12:12 Z2009-11-14T03:12:12Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/d1805ceb-41bc-4770-be9a-069c2df2002bhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/d1805ceb-41bc-4770-be9a-069c2df2002bGuilherme K. Oliveirahttp://social.msdn.microsoft.com/Profile/en-US/?user=Guilherme%20K.%20OliveiraGeneri functionsHi,<br /><br />I am trying to generate MSIL code for a simple generic function like this:<br /><br /> <pre lang="x-c#">class MyClass { public T foo&lt;T&gt;(T arg) { return arg; } }<br /></pre> But I'm getting the following erros:<br />Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\types\type.inl, Line 746<br />&nbsp; this-&gt;IsConstant<br />&nbsp; in (Function number 4) applyrgs [line 10] during Lower<br />&nbsp; in (PEModule) Executable.Base.exe<br />&nbsp; in (Program) &lt;unnamed unit&gt;<br />Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\types\type.inl, Line 746<br />&nbsp; this-&gt;IsConstant<br />&nbsp; in (Function number 4) applyrgs [line 10] during Lower<br />&nbsp; in (PEModule) Executable.Base.exe<br />&nbsp; in (Program) &lt;unnamed unit&gt;<br />Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\types\type.inl, Line 746<br />&nbsp; this-&gt;IsConstant<br />&nbsp; in (Function number 4) applyrgs [line 10] during Lower<br />&nbsp; in (PEModule) Executable.Base.exe<br />&nbsp; in (Program) &lt;unnamed unit&gt;<br />Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\ir\ir.cpp, Line 7358<br />&nbsp; this-&gt;FunctionUnit-&gt;Architecture-&gt;CanEnregisterType(type)<br />&nbsp; in (Function number 4) applyrgs [line 10] during Lower<br />&nbsp; in (PEModule) Executable.Base.exe<br />&nbsp; in (Program) &lt;unnamed unit&gt;<br />Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\ir\ir.cpp, Line 8675<br />&nbsp; functionUnit-&gt;Architecture-&gt;CanEnregisterType(type)<br />&nbsp; in (Function number 4) applyrgs [line 10] during Lower<br />&nbsp; in (PEModule) Executable.Base.exe<br />&nbsp; in (Program) &lt;unnamed unit&gt;<br />Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\types\type.inl, Line 746<br />&nbsp; this-&gt;IsConstant<br />&nbsp; in (Function number 4) applyrgs [line 10] during Lower<br />&nbsp; in (PEModule) Executable.Base.exe<br />&nbsp; in (Program) &lt;unnamed unit&gt;<br />Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\types\type.inl, Line 746<br />&nbsp; this-&gt;IsConstant<br />&nbsp; in (Function number 4) applyrgs [line 10] during Lower<br />&nbsp; in (PEModule) Executable.Base.exe<br />&nbsp; in (Program) &lt;unnamed unit&gt;<br />Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\metadata\metadata.cpp, Line 10204<br />&nbsp; Unreached<br />&nbsp; in (Function number 4) applyrgs [line 10] during Stack Allocation<br />&nbsp; in (PEModule) Executable.Base.exe<br />&nbsp; in (Program) &lt;unnamed unit&gt;<br /><br /><br />Any ideas of what is causing this?<br /><br />Thanks,<br />GuilhermeThu, 15 Oct 2009 21:57:05 Z2009-11-12T20:31:51Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/efcb72df-25d7-481c-8cc7-1ee935476b04http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/efcb72df-25d7-481c-8cc7-1ee935476b04Yostal_Servicehttp://social.msdn.microsoft.com/Profile/en-US/?user=Yostal_ServiceLinking to a dll from a Plugin<p>I would like to build a plugin that inserts call instructions into the code it is creating that will call a dll, as in the BBCount example.  However, the BBCount example uses the PEModuleUnit's built in features to allow for the creation of an import symbol.  I've looked as well at the LoopInstrumentation example, but the example does not actually have to link up to a separate dll.<br/><br/>I <em>think</em>  the key component I am missing is the ability to create an ImportModuleSymbol.  My clumsy attempts to do so are what cause my Phoenix exceptions currently, and if I could do that, the rest of the BBCount code seems to be compatible with what I am doing.<br/><br/>Thanks in advance for any help you can provide.</p>Fri, 06 Nov 2009 15:32:45 Z2009-11-09T17:30:27Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/d5223c7d-3a24-4f3e-a9b1-fb3772ff275ehttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/d5223c7d-3a24-4f3e-a9b1-fb3772ff275eEricLarsonhttp://social.msdn.microsoft.com/Profile/en-US/?user=EricLarsonGet IRViewer to run? I was looking through the Phoenix tutorials and noticed an IRViewer that views IR in a tabular form.  The tutorials contained code to build the viewer but I ran into the following compiler error:<br><br>Error 5 error C2039: 'Register' : is not a member of 'Phx::ExtensionObject' c:\Users\elarson\Documents\Visual Studio 2008\Phoenix Info\Practical Phoenix Tutorial (Mar 07)\tutorial\IRViewer\IRViewerExtension.cpp 22 IRViewer<br><br>I'm using the Arpil 2008 SDK on Visual Studio 2008 so it may be a compatibility issue.<br><br>Thanks! Mon, 16 Jun 2008 21:19:00 Z2009-11-09T12:09:23Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/eea21a7e-de60-4f8f-9531-3975c4319d0bhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/eea21a7e-de60-4f8f-9531-3975c4319d0bDefaultStevehttp://social.msdn.microsoft.com/Profile/en-US/?user=DefaultSteveBreakage with .net 4.0?Hi all, I have been using the Phoenix compiler as a frontend for some code analysis. Then last week I decided to try out the VS 2010 beta and implement a dynamic instrumentation tool I have been wanting to build for a while. Since Phoenix is VS 2008 only my plan was to try out VS 2010 while I wrote a DLL that managed all the book-keeping and then call this from a rewritten (using Phoenix) binary. <br/> <br/> All went well until I tried to implement my rewriter with Phoenix, then I could not read in the .exe I wanted to rewrite without errors (it seems the problem involved some dll's not resolving correctly). In fact at this point in time my previously working analysis tool was failing with the same errors. Additionally most of the sample code provided with Phoenix failed to compile (mostly with unresolved dll references) and if they did run promptly failed with strange exceptions. <br/> <br/> I then installed a fresh copy of Win 7 (which should have .net 4.0 by default) and VS 2008. Again all the Phoenix based code failed to build and/or run. I then returned to my orig. installation of Vista, uninstalled VS 2010 and .net 4.0. Now at least my analyzer code works although some of the Phoenix samples still fail. Tomorrow I am going to do a fresh install of Vista and VS 2008 to see if this resolves all problems.<br/> <br/> So short story, there seems to be something about .net 4.0 that completely breaks Phoenix. <br/> <br/> Although I think I have resolved my problems I wanted to report this issue and post this so that other users are aware of it. If there is any other useful information I can provide let me know,<br/> Mark<br/> <br/> <br/>  Thu, 05 Nov 2009 23:48:03 Z2009-11-07T23:31:48Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/2193e833-657c-47a9-925e-77fa0fe6cb33http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/2193e833-657c-47a9-925e-77fa0fe6cb33John Connorhttp://social.msdn.microsoft.com/Profile/en-US/?user=John%20ConnorPhx.PEModuleUnit.Open Hello. <br/> What should I do to make the following code work? <br/> Phx.PEModuleUnit moduleUnit = Phx.PEModuleUnit.Open(&quot;test.exe&quot;); <br/> this is a simple line. I am so suprised that it occur a fatal error when i was building my project. why???????????????????????????????????Wed, 28 Oct 2009 13:23:39 Z2009-11-06T06:54:07Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/245c3d55-6c9a-4a40-8023-513a08ac435bhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/245c3d55-6c9a-4a40-8023-513a08ac435bketnethttp://social.msdn.microsoft.com/Profile/en-US/?user=ketnetfind specific instructions &lt;!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:&quot;&quot;; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:&quot;Times New Roman&quot;; mso-fareast-font-family:&quot;Times New Roman&quot;;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} --&gt; <p class=MsoNormal>I would like to search for specific instructions in the assembly code so that i can add code myself<br/> The instructions are:<br/> push ebp<br/> pop edp<br/> <br/> how can i check that the instruction read in an iterate loop is the instruction show above?<br/> I know you can check common instructions like NOP by using (<span style="font-size:10pt;font-family:'Courier New'">Phx.Common.<span style="color:#2b91af">Opcode</span> .Nop</span> ) to compare but can you also check for push and pop (with arguments)</p> <br/> <br/> <br/> <br/> <br/>Mon, 02 Nov 2009 15:37:49 Z2009-11-09T10:14:46Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/68ae1d4d-60c7-4a44-b1b1-065ea40b2a7bhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/68ae1d4d-60c7-4a44-b1b1-065ea40b2a7bJohn Connorhttp://social.msdn.microsoft.com/Profile/en-US/?user=John%20ConnorSome Problem about Phoenix redirect Plug-in's output??<p>Hello everyone :<br/><br/>could it does just like the title?<br/>i want to redirect output to a file just like &quot;FlowGraph.txt&quot;;<br/>so i add the follow code to the Execute method:</p> <div style="color:black;background-color:white"> <pre>System.IO.TextWriter t = <span style="color:blue">new</span> System.IO.StreamWriter(<span style="color:#a31515">&quot;FlowGraph.txt&quot;</span>);<br/><br/><br/> <br/><br/><br/> System.Console.SetOut(t); <br/><br/><br/><br/> </pre> </div> <p>i built the plug-in, it done.<br/>but when i use the commod line just like &quot;cl -d2plugin:FlowGraph.dll test.cpp&quot;<br/><br/><br/>it output the follow line to the console(not the file):<br/><br/>fatal error C1001:An internal error has occurred in the compiler.<br/>(compiler file 'd:\enlistments\sdk_june08\src\clients\c2\c2-diagnostice.cpp',line 742)<br/>Unhandled Exception<br/><br/>why ?? i think i did all the right thing!!</p>Thu, 29 Oct 2009 11:03:48 Z2009-10-30T07:50:18Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/cd8d7f3f-32ae-4faa-8099-1fcd5d82d8bdhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/cd8d7f3f-32ae-4faa-8099-1fcd5d82d8bdProgramAnalysthttp://social.msdn.microsoft.com/Profile/en-US/?user=ProgramAnalystProgram Analyst No Sir , i am working on tiny c like language using ocaml ..for analysis ..<br/> <br/> and i need to construct CFG using ocaml ..i need help for constructing CONTROL FLOW GRAPH  of if , while , for , return , function statement so please help me outThu, 29 Oct 2009 13:25:21 Z2009-10-30T07:43:52Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/73a74ef8-6fb4-46d2-bf93-d47b1be02ea6http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/73a74ef8-6fb4-46d2-bf93-d47b1be02ea6John Connorhttp://social.msdn.microsoft.com/Profile/en-US/?user=John%20Connorthere must be something wrong with my Phoenix!!!!!!!!!!!!!!!!!! when i run the example &quot;ipo-plug-in&quot;; my cmdline is &quot;cl -deplugin:ipo-plug-in.dll test.cpp&quot;; but there must be something wrong with that , it output &quot;C2 Pass 0 not found in passlist:&quot;; but the &quot;Phoenix Document&quot; said that &quot;the c2 compiler has two passes. The first pass performs necessary preparations before code generation, and the second pass does the actual code generation. &quot; why ? is there something wrong wiht my phoenix? my phoenix's version is &quot;Phoenix-SDK-June-2008-RC1&quot;. i changed the code ,i insert the C2Pass before &quot;C2 Codegen Pass&quot;.but there is some other wrong,it output that &quot;the callgraph is null&quot;. why ????? thanks !!! Wed, 28 Oct 2009 10:18:38 Z2009-10-30T07:39:50Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/6f78e216-f1e9-40a3-9cfd-cf9a1c0cea95http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/6f78e216-f1e9-40a3-9cfd-cf9a1c0cea95howtenthttp://social.msdn.microsoft.com/Profile/en-US/?user=howtentControl Flow Graph Add-in installed but cannot see Control Flow GraphHi All:<br /> <br /> &nbsp;&nbsp;&nbsp; I had installed Phoenix recently and is using Visual Studio 2008. And in Visual Studio 2008, I had installed Control Flow Graph Add-in and can see the <strong>Control Flow Graph window</strong> and A Control Flow Graph Window Button added onto my VS2008 after the installation.<br /> <br /> &nbsp;&nbsp; I created a C++ program using VS2008, the CodeModel comment is added into the C++ program.<br /> <br /> &nbsp;&nbsp;&nbsp; However when a position my Cursor onto a function name in the C++ program, I am <strong>Not</strong> able to see <strong>Control Flow Graph</strong> on the <strong>Control Flow Graph Window. </strong> <br /> <br /> &nbsp;&nbsp; Is there anyone who knows what is the problem? Why I can't see any graph on the Control Flow Graph Window?<br /> <br /> &nbsp;&nbsp; Many thanks <br />Mon, 05 Oct 2009 15:57:58 Z2009-10-29T06:32:57Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/d2bab9ca-3da9-435d-983c-2474bdf86acchttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/d2bab9ca-3da9-435d-983c-2474bdf86accProgramAnalysthttp://social.msdn.microsoft.com/Profile/en-US/?user=ProgramAnalystControl Flow graph construction using ocaml I am working on developing ocaml analyzer can any one help me how to contruct Control Flow Grpah for Simple tiny language ..Wed, 28 Oct 2009 08:22:33 Z2009-10-29T06:28:57Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/6fc579b8-dc1c-4d41-a147-1360d3c281f9http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/6fc579b8-dc1c-4d41-a147-1360d3c281f9Guilherme K. Oliveirahttp://social.msdn.microsoft.com/Profile/en-US/?user=Guilherme%20K.%20OliveiraFunctionArgument on June 2008 SDKHello,<br><br>What happened with the Phx.Symbols.FunctionArgument on this new SDK? What should I do to make the following code work?<br><br>     Phx.Symbols.FunctionArgument functionArgument =<br>                            Phx.Symbols.FunctionArgument.New(funcSymbol, argsName, parameterId++);<br>     funcSymbol.AppendFunctionArgument(functionArgument);<br><br>Regards,<br>Guilherme Oliveira<br><br> Fri, 05 Sep 2008 00:59:31 Z2009-10-28T19:34:38Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/2aa73704-6ce7-42d3-b5de-311d518fdeeahttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/2aa73704-6ce7-42d3-b5de-311d518fdeeavijaygillhttp://social.msdn.microsoft.com/Profile/en-US/?user=vijaygillPascal to MSIL / C# translationHi,<br /> Is it possible to use phoenix to generate a translator / compiler to help us in migrating our legacy turbo pascal applications to .Net?<br /> <br /> Thanks<br /> VijayThu, 08 Oct 2009 11:21:36 Z2009-10-18T09:47:02Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/7189806a-e303-48a7-ade9-ee0ece507acahttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/7189806a-e303-48a7-ade9-ee0ece507acasagarjhttp://social.msdn.microsoft.com/Profile/en-US/?user=sagarjProcess Command-Line options for a phoenix pluginHi,<br /> I want my phoenix plugin to take an argument say '-func:main' in the command line and would then like to run my plugin for that function only.<br /> For above example, what should be the input command line and how should I process this flag in my plugin code. Please note that I am working with Pass.<br /> <br /> Thanks,<br /> SagarWed, 14 Oct 2009 06:17:17 Z2009-10-18T07:01:01Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/b064ab9e-e8ae-4693-92dc-2e640cc0794bhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/b064ab9e-e8ae-4693-92dc-2e640cc0794bSarah Derstadt - MSFThttp://social.msdn.microsoft.com/Profile/en-US/?user=Sarah%20Derstadt%20-%20MSFTPhoenix in the Industry<p>Hello, and welcome to the Phoenix forum! I am the Release Program Manager for the Phoenix product team.  I wanted to quickly mention our current participation in the industry.</p> <p>In addition to our RDK, we have also produced a Commercial Development Kit.  This CDK contains the same bits of Phoenix as the RDK, but by including a different End User License Agreement allows our commercial partners early access to Phoenix.  The CDK is not available via download and only by contacting the product group.  We currently have over a dozen companies of various sizes learning about Phoenix. At this point, use of Phoenix within the industry is still very restricted to internal research.  </p> <p>Over the next 6 months, the Phoenix team will be transitioning from the RDK/CDK release to our SDK.  This SDK will be available through a Beta program up until we ship with a future version of Visual Studio.</p> <p>Thank you,</p> <p>Sarah Derstadt - MSFT</p>Tue, 27 Feb 2007 17:50:48 Z2009-10-27T07:14:01Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/066fe1f1-5ec5-412e-b8b7-f2222ee99c33http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/066fe1f1-5ec5-412e-b8b7-f2222ee99c33Christoph Müllerhttp://social.msdn.microsoft.com/Profile/en-US/?user=Christoph%20M%u00fcllerEnumerate all (unused) extern types<p>Hi,<br/><br/>I am quite new to using Phoenix, and what I want to do is enumerating all (especially unused) types that have been #included in a unit of a C++ program. My first idea was to take an example pass and using moduleUnit.TypeTable.AllTypes in a PostPassEvent. However, this type table seems only to include types that are actually used - is my observation correct? The symbol table behaves quite similar.<br/><br/>Therefore, my question is how I would get <em>all</em> types/functions that are declared (extern) in the unit, regardless of whether they are used or not.<br/><br/>Additionally, are there special requirements on how I must use the compiler? Currently, I am compiling an already pre-processed C++ file with /Od. Is this sufficient?<br/><br/>Best regards,<br/>Christoph</p>Mon, 28 Sep 2009 12:57:05 Z2009-09-30T05:08:24Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/8f12090e-99f1-4654-b201-09041cc99a98http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/8f12090e-99f1-4654-b201-09041cc99a98shootingsyhhttp://social.msdn.microsoft.com/Profile/en-US/?user=shootingsyhGenerate function calls a wrong typeI try to generate a function call in assembly A. The function defined in assembly B with a parameter of type T. The function is generated and get called. But it throw an Mechod not found exception that shows the function parameter is of type System.Reflection.AssemblyTitleAttribute.<br/><br/>Unhandled Exception: System.MissingMethodException: Method not found: 'Void source.Class1.log(System.Reflection.AssemblyTitleAttribute)'.<br/><br/>Does anyone know what happens here? what the system.reflecton.assemblyTitleAttribute? I define the log function with a parameter of type T. Why it is looking for such a type?Fri, 11 Sep 2009 03:22:57 Z2009-09-29T07:08:28Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/afaf9c04-4890-45b5-ba1f-cf7de6911c9chttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/afaf9c04-4890-45b5-ba1f-cf7de6911c9cBenK3http://social.msdn.microsoft.com/Profile/en-US/?user=BenK3Install errorGet this error on install any ideas ?<br/> <br/> 1: PhxLogo.ico <br/> 1: BugSpray.ico <br/> 1: {D12775DE-6D75-47A7-8354-44EFBA97B131} <br/> Action 18:24:50: RegisterVCSProjectTemplates. <br/> Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.  Action RegisterVCSProjectTemplates, location: C:\Program Files\Microsoft Visual Studio 9.0\\Common7\IDE\devenv.exe, command: /setup <br/> MSI (s) (DC:4C) [18:29:11:726]: Product: Microsoft Platform SDK Codenamed 'Phoenix' (June 2008 CTP) -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.  Action RegisterVCSProjectTemplates, location: C:\Program Files\Microsoft Visual Studio 9.0\\Common7\IDE\devenv.exe, command: /setup <br/> <br/> VS2008 professional with C++Installed ( but not 64 bit C++) <br/>Wed, 09 Sep 2009 11:02:28 Z2009-09-29T07:04:52Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/3820bed5-793f-49a8-8b8e-b6eae6812140http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/3820bed5-793f-49a8-8b8e-b6eae6812140taylorjonlhttp://social.msdn.microsoft.com/Profile/en-US/?user=taylorjonlUsing C2.exe with CSC.exeIs it possible to use C2.exe to compile a managed executable to a native executable?  I have read that C2.exe can be used to compile IL to native code but the only documentation I can find in the SDK documents about using C2.exe requires intermediate files generated by the CL.exe C++ compiler.<br/><br/>If I can't use the C2.exe executable, can I use the pheonix framework to do this without having to write a frontend?Thu, 24 Sep 2009 06:29:55 Z2009-09-29T06:44:43Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/cc400aa8-1301-40e9-86cf-d933960ccea5http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/cc400aa8-1301-40e9-86cf-d933960ccea5Himanshu Kumar Singhhttp://social.msdn.microsoft.com/Profile/en-US/?user=Himanshu%20Kumar%20SinghFuture of Phoenix ?<p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:8pt;color:black;font-family:Verdana">Note: I have created this new thread since the last one with similar question was more than two years old and did not show much activity.<br/><br/>We have been evaluating various frameworks and tools over last one year in order to arrive at one that best suites our needs. Our basic requirement is to implement a custom code analysis tool for C# and C++. Among other things, the tool will require access to data flow framework, control flow graphs and alias information.<br/><br/>Phoenix is one of the few tools / frameworks shortlisted for further investigation with respect to suitability to our need. But, there has been almost no activity on the Commercial Licensing front since the June 2008 CTP Release, and neither has there been much recent activity on the Phoenix forum. This has led to an inkling of a doubt regarding the future development and support of the Phoenix framework.<br/><br/>Is Microsoft planning any future release or support of the framework? If yes, what is the expected timeline for the next release?<br/><br/>Himanshu Kumar Singh<br/>Siemens</span></p>Fri, 25 Sep 2009 10:35:46 Z2009-09-27T08:00:56Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/5fa7e8b1-b535-4bd2-9d6b-896370aa97fbhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/5fa7e8b1-b535-4bd2-9d6b-896370aa97fbMultipointNoobhttp://social.msdn.microsoft.com/Profile/en-US/?user=MultipointNoobRedirecting Phoenix textual output (Dump)Hello.<br/> <br/> I'm using Phoenix inside a C# application. It runs in a secondary AppDomain and I have no major problems.<br/> <br/> I'm having hard times trying to redirect the standard output of Phoenix to an internal console.<br/> I don't even know how Phoenix itself is written but I suppose it doesn't use System.Console because Console.SetOut() has no effect on it.<br/> <br/> Are there any hooks that I can use to get the result of methods like FunctionUnit.Dump()?<br/> Is there a way to get the same textual representation that FunctionUnit.Dump() prints as string?<br/> FunctionUnit.ToString() is not enough.<br/> <br/> <br/> Thanks!<br/>Sun, 16 Aug 2009 13:37:06 Z2009-09-29T07:09:24Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/c6d467c3-eba3-46a0-93ed-e8d098d61915http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/c6d467c3-eba3-46a0-93ed-e8d098d61915charlesriverhttp://social.msdn.microsoft.com/Profile/en-US/?user=charlesriverRun the sample program of addcall, why there is an Unhandled Exception at moduleUnit->Close(); ? Thanks!<p>Thanks in advance!!!<br/>What is the possible reason the problem ?<br/>I used the sampel program to run testapp.exe .<br/>It works.<br/>While I used it to add call to my own program, it always report an exception message.<br/>----Here is the exception message----<br/>I:\Program Files\Phoenix SDK June 2008\samples\AddCall\cpp\Debug&gt;addcall.exe /ou<br/>t addtest.exe /pdbout addtest.pdb /importdll ExoDLL.dll /importmethod DisplayBox<br/> /localmethod foo /in winform.exe<br/>Total Global Symbols  Count - 2045</p> <p>Unhandled Exception: Phx.FatalError: Exception of type 'Phx.FatalError' was thro<br/>wn.<br/>   at Phx.FatalError.Dispatch()<br/>   at Phx.PE.Utilities.UserError(String infoString)<br/>   at Phx.PEModuleUnit.MakeEmptyFunctionUnitForEncodedIR(FunctionSymbol function<br/>Symbol)<br/>   at Phx.PEModuleUnit.LoadEncodedIRUnitList()<br/>   at Phx.PEModuleUnit.GetEnumerableContributionUnit(ContributionUnitEnumeration<br/>Kind contributionUnitEnumerationKind)<br/>   at Phx.PEModuleUnit.GetEnumerableContributionUnit()<br/>   at DoAddInstrumentation(PEModuleUnit moduleUnit) in i:\program files\phoenix<br/>sdk june 2008\samples\addcall\cpp\addcall.cpp:line 298<br/>   at main(String[] arguments) in i:\program files\phoenix sdk june 2008\samples<br/>\addcall\cpp\addcall.cpp:line 143</p>Thu, 27 Aug 2009 17:33:43 Z2009-09-09T03:51:39Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/975790cd-059f-43cc-9c76-07e97443485chttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/975790cd-059f-43cc-9c76-07e97443485cAzeem.coolhttp://social.msdn.microsoft.com/Profile/en-US/?user=Azeem.coolHelp Regarding Induction variableI want to implement the induction variable optimization as suggested in Beyond Induction Variables by Wolfe. The algo which i was going to use was Build SSA then find Strongly connected regions and then mark induction variables[variables in instructions of standard form] could you please help me out how to get the variables list out of an instruction and connect it with SSA variables.<br/> <br/> Thank You.Mon, 03 Aug 2009 06:19:35 Z2009-08-19T06:04:39Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/c54e16fc-d5ce-47d9-9f71-fa4eed556c70http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/c54e16fc-d5ce-47d9-9f71-fa4eed556c70yuazhanghttp://social.msdn.microsoft.com/Profile/en-US/?user=yuazhangHow to get the control flow graph for the entire programHi,<br/>    <br/>    I know how to get the flow graph for each function, but  is there any way to the get the control flow graph for an entire program containing multiple functions, or multiple input files, since I want to work on the whole program to analyze something?  How to do that?<br/> <br/>    Thank you very much!<br/> <br/> Regards,<br/> RayThu, 30 Jul 2009 03:15:39 Z2009-08-19T05:50:56Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/ae4b994d-3e5f-4006-a94e-7d5acc116a1dhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/ae4b994d-3e5f-4006-a94e-7d5acc116a1dGeek Moseshttp://social.msdn.microsoft.com/Profile/en-US/?user=Geek%20MosesI cannot find a compiler that uses a Graphic Language.I've read through my related threads, and I didn't see any answers.<br/><br/>This thread is where I attempted to say the same thing.  I just fail to make it simple.<br/><a href="http://social.msdn.microsoft.com/Forums/en-US/hottechnology/thread/4085dabc-f161-4ac8-957f-72f2141b1509/">http://social.msdn.microsoft.com/Forums/en-US/hottechnology/thread/4085dabc-f161-4ac8-957f-72f2141b1509/</a><br/><br/>I wish that Microsoft Research, would really look into Digital Logic Gates, in the simplest form.  The Graphic Language would consist of the basic logic gates, AND, OR, NOT, XOR, NAND, and NOR.  This piece of Code Represents a 3 input AND gate.<br/><br/>DIM X as MousePointer X<br/>DIM Y as MousePointer Y<br/>DIM Z as MouseClickEvent<br/>DIM Output as Boolean  <br/><br/>Output = 'False'  'Gate Logic places the boolean sense of False as 0 in circuit design.<br/><br/>' Supposing that X is the Horizontal pixel grid on the screen and Y the vertical,<br/>' Z could take place anywhere on the screen.<br/><br/>IF X &gt; 180 AND X &lt; 360 AND Y &gt; 200 AND Y &lt; 250 AND Z &lt;&gt; 0 THEN<br/>Output = 'True'<br/>ELSE<br/>Output = 'False'<br/>END IF<br/><br/>If that were a circuit, X were a voltage, Y another voltage, and Z a switch that was either on or off, between 180 and 360 volts X's swich is set to 1, and when Y's voltage is between 200 and 250 Volts, it's switch is on/set to an output of 1.  So, this could be drawn as a 3 input AND gate.  Since, the IF Statement is so flexible that we can do anything following the THEN or ELSE part of the code, the output of an AND gate is not always equal to one.  It is actually sent to one of if not a series of pointers.  In the logic of the Graphic Computer Language I am trying to establish, you should be able to use these sections of the program to generate a true boolean/Gate Logic Truth Table.  In any program all of the math that works for the least number of gates, works for these parts of your code.  If the pointer went to more code, I would just call a Sub Public or Private.<br/><br/>So, when I say, you could actually produce a virus free operating system, that doesn't mean when it arrives at the market.  That means for the duration of it's operation it can keep itself from running viruses.  First, you have to have the Langauge the computer can read.  Second, you have to derive the truth tables that define a virus.  If the compiler includes a decompiler, and the decompiler is just checking to make sure that the computer program was written by a native compiler, then the problem of having a machine figure out whether a program is a virus or not is nearly solved.  Every program requires User Input.  If it doesn't it has to be a driver, codec, DLL, but nothing that doesn't start with a mouse click, or a keystroke.  Now, think about a virus, it usually is more like a TSR that doesn't pay attention to the USER.  A video game always pays attention and the input is typically a joystick or other, sound or video.  Any binary file is treated as a binary first and only data.  Until, the decompiler has checked it, the operating system has to wait to execute the program.  That's why the operating system needs to be designed after the compiler.<br/><br/>There are dozens of different ways I could have written that last piece of code.  But, in Assembly Language, the way you would write the code would never include an IF statement.  X, Y, Z and Output would all be assigned values as Variables.  Keeping this centered around the ALU the Greater Than &gt; and Less Than &lt; turns this into a 5 input AND gate.  Each time you present greater than or less than it represents an input and the non-zero condition of Z only represents one input.  In Assembly Language, you would then have a jump statement to tell it which line of code to go to if all of the conditions were true, and then if they are not which line of code to jump to.  Now, I know which way data is flowing, it doesn't really matter if it's a string or a variable, in gate logic that's all 1s and 0s.  As long as I have converted that into a gate I can determin the flow of information through any other program that is verified as safe to the operating system.  If there is no user input causing the domino effect in some part of that code, no matter how long it is, that has no, requires no, and waits for no user input, then it must be malicious code.  If I walk away from my computer, and another computer calls my machine, and asks for data, web links, history, credit card numbers, or maybe a keystroke recorder.  Why doesn't text ever show on the screen.  Oh, look at the truth table.  The user cannot see the information, and it never makes it through any part of the code it generates to display it on the screen, and it's not sent to the sound card.  When the user has nothing to do with it, it is detectable in the truth table.  But, you have to be able to track all of that through several layers of software, drivers, dlls, codecs, and finally your user interface.<br/><br/>I should be able to translate that IF statement into a graphic of a keyboard, mouse, screen, sound/speaker, joystick, modem/network ports, printer, and the program as a bunch of logic gates.  I never need to run the program to know if it's going to send something unwanted to through my hardware.<br/><br/>There are plenty of Digital Logic Gate Simulators, that run simulated logic gates.  In a matter of seconds if not just a few moments, determine all of the possible logical states of that network of gates.  So, why doesn't anyone want a language that would keep commands like PARSE, MID, WEND, WHILE, LOOP UNTIL, go so far as a sophisticated scientific calculator in complex commands, and really just manage pointers/jump commands.  I have looked into it, and tested a few short pieces of Assembly Language Code to work as a AND gate, when it comes down the clock cycles it matches most.  But, then there are no alogorithms or theorms like Demorgan's and most of which you learn in basic algebra to use math to eliminate unneeded code from the binary or the source before it is compiled.  If you have extra commands or lines of code that could be written differently, the computer can actually solve that Boolean Algebraic equation for you.  But, if you continue to use the program languages that are out there, there will just be more viruses.  You won't have an Effective Heuristic Anti-Virus Engine designed into the Operating System.<br/>Tue, 09 Jun 2009 10:14:00 Z2009-07-09T20:07:33Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/8354c445-6ac2-4a96-afe5-4b292ad77efdhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/8354c445-6ac2-4a96-afe5-4b292ad77efdif ifhttp://social.msdn.microsoft.com/Profile/en-US/?user=if%20ifProblems in running Lattice analyzer after adding memory operandsHello,<br/>I'm trying to do something which involves changing the flow graph of the function, so as to include a newly created basic block which comprises of instructions that have a couple of manually created memory operands, which have no tags assigned yet. So to assign tags, I create a lattice analyzer, and run it manually using: myLatticeAnalyzer.Run(), after setting myLatticeAnalyzer.DoApplyCallSummaries to true. When I run the lattice analyzer, I get the following errors:<br/><br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\lattices\alias-lattice.cpp, Line 193<br/>  !lattice-&gt;SsaInfo-&gt;DoIncludeAliasedVariables<br/>  in (Function number 0) ?mallocIndirectToInt@@YAXPAPAH@Z [line 0] during CustomLatticePhase<br/>  in (Module) testipo2.cpp<br/><br/>Can somebody please help me and tell me what should be done in such a situation.<br/><br/>Regards,<br/>If IfFri, 03 Jul 2009 05:10:54 Z2009-07-09T14:11:17Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/05906ac5-21a1-4f55-a82a-ea4c860a0bf0http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/05906ac5-21a1-4f55-a82a-ea4c860a0bf0AAyoubhttp://social.msdn.microsoft.com/Profile/en-US/?user=AAyoubI cannot debug an assembly after phoenix pass.<p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="font-size:12pt;line-height:115%;font-family:'Times New Roman','serif'" lang=EN-US>Hi,</span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="font-size:12pt;line-height:115%;font-family:'Times New Roman','serif'" lang=EN-US>I just apply the instrumentation tool template in VS C# express 2008 without any transformation and the debugger steps throw the generated code abnormally. Here the assembly source code:<br/><br/></span></p> <pre lang="x-c#">namespace test { class Program { static void Main(string[] args) { int argc = 0; if (argc == 0) { Console.WriteLine(&quot;&quot;); } else { Console.WriteLine(&quot;&quot;); } } } }</pre> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="font-size:12pt;line-height:115%;font-family:'Times New Roman','serif'" lang=EN-US>For instance the debugger goes through the two WriteLine. When I disassemble the assembly with ildasm I get the following IL with the corresponding source line.<br/><br/></span></p> <pre>.method private hidebysig static void Main(string[] args) cil managed { .entrypoint // Code size 49 (0x31) .maxstack 2 .locals init ([0] int32 argc, [1] bool CS$4$0000) .language '{3F5162F8-07C6-11D3-9053-00C04FA302A1}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' // Source File 'F:\Etudes\Phd\research\Projects\testDebug\test\Program.cs' //000010: { IL_0000: nop //000011: int argc = 0; IL_0001: ldc.i4.0 IL_0002: stloc.0 //000012: if (argc == 0) IL_0003: ldloc.0 IL_0004: ldc.i4.0 IL_0005: ceq IL_0007: ldc.i4.0 IL_0008: ceq IL_000a: stloc.1 IL_000b: ldloc.1 IL_000c: brtrue IL_0023 IL_0011: nop IL_0012: ldstr &quot;&quot; IL_0017: call void [mscorlib]System.Console::WriteLine(string) IL_001c: nop IL_001d: nop IL_001e: br IL_0030 IL_0023: nop IL_0024: ldstr &quot;&quot; IL_0029: call void [mscorlib]System.Console::WriteLine(string) IL_002e: nop IL_002f: nop IL_0030: ret } // end of method Program::Main</pre> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="font-size:12pt;line-height:115%;font-family:'Times New Roman','serif'" lang=EN-US>However, ildasm generated the following code for the original assembly:<br/><br/></span></p> <pre>.method private hidebysig static void Main(string[] args) cil managed { .entrypoint // Code size 43 (0x2b) .maxstack 2 .locals init ([0] int32 argc, [1] bool CS$4$0000) .language '{3F5162F8-07C6-11D3-9053-00C04FA302A1}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' // Source File 'F:\Etudes\Phd\research\Projects\testDebug\test\Program.cs' //000010: { IL_0000: nop //000011: int argc = 0; IL_0001: ldc.i4.0 IL_0002: stloc.0 //000012: if (argc == 0) IL_0003: ldloc.0 IL_0004: ldc.i4.0 IL_0005: ceq IL_0007: ldc.i4.0 IL_0008: ceq IL_000a: stloc.1 IL_000b: ldloc.1 IL_000c: brtrue.s IL_001d //000013: { IL_000e: nop //000014: Console.WriteLine(&quot;&quot;); IL_000f: ldstr &quot;&quot; IL_0014: call void [mscorlib]System.Console::WriteLine(string) IL_0019: nop //000015: } IL_001a: nop IL_001b: br.s IL_002a //000016: else //000017: { IL_001d: nop //000018: Console.WriteLine(&quot;&quot;); IL_001e: ldstr &quot;&quot; IL_0023: call void [mscorlib]System.Console::WriteLine(string) IL_0028: nop //000019: } IL_0029: nop //000020: } IL_002a: ret } // end of method Program::Main </pre> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="font-size:12pt;line-height:115%;font-family:'Times New Roman','serif'" lang=EN-US>It seems that the debug information has disappeared. </span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="font-size:12pt;line-height:115%;font-family:'Times New Roman','serif'" lang=EN-US>Can someone help me please? I do a lot of instrumentation and now I need to debug the instrumented assembly, at least for the part of code that I didn’t touch.</span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="font-size:12pt;line-height:115%;font-family:'Times New Roman','serif'" lang=EN-US>Thank you!</span></p> <p> <p> </p> </p>Sat, 04 Jul 2009 17:13:20 Z2009-07-07T03:23:02Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/eaf5c602-e74a-43a0-a262-a5ce9b02cccdhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/eaf5c602-e74a-43a0-a262-a5ce9b02cccdAAyoubhttp://social.msdn.microsoft.com/Profile/en-US/?user=AAyoubHow to add and reference a new field within Generic Class<p class=MsoNormal style="margin:0cm 0cm 10pt"><span lang=EN-US><span style="font-size:small;font-family:Calibri">Hi,</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span lang=EN-US><span style="font-size:small;font-family:Calibri">I’m working with Phoenix for .Net Assembly Transformation and my question is how we can add a new field to a generic Class and then load it.</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span lang=EN-US><span style="font-size:small;font-family:Calibri">Suppose for instance we have the following Generic Class :<br/></span></span></p> <pre lang="x-c#">public class Test&lt;T&gt; { private T value; public Test(T value) { this.value = value; } public T Value { get { return value; } set { this.value = value; } } }</pre> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="font-size:10pt;line-height:115%;font-family:'Courier New'">And we need to transform this to <br/></span></p> <pre lang="x-c#">public class Test&lt;T&gt; { private T value; int newfield; public Test(T value) { this.value = value; } public T Value { get { return value; } set { this.value = value; } } public void MyMethod(int t) { newfield = t; } }</pre> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style=""><span style="font-size:small"><span style="font-family:Calibri">When I consider the field as a usual field, I’m able to generate the modified generic class. However the PEVerify tool complain with the following Error :</span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><em><span style=""><span style="font-size:small"><span style="font-family:Calibri">System.BadImageFormatException: Fields inside generic classes must be referenced using MemberRefs, even in the same module as the class.</span></span></span></em></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span lang=EN-US><span style="font-size:small;font-family:Calibri">After some try I noted that to reference a field within the generic class we have to load the field of the class instantiated with the type variable “!0” as follows :<br/></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"> </p> <pre lang="x-c#">Phx.Collections.TypeList typeList = Phx.Collections.TypeList.New(Phx.GlobalData.GlobalLifetime); typeList.Append(testType.TypeVariableTypeList.Head.Data); Phx.Types.AggregateType insta = testType.Instantiate(typeList); </pre> <p class=MsoNormal style="margin:0cm 0cm 10pt"> </p> <span style="font-size:10pt;line-height:115%;font-family:'Courier New'"> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style=""><span style="font-size:small"><span style="font-family:Calibri">However this works only for an existing field because when we add a new field to the generic class, this field does not appear in the instantiated class. Even, if I try to add the field manually I get exception error. </span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style=""><span style="font-size:small"><span style="font-family:Calibri">Can somebody give me a guidance please?</span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style=""><span style="font-size:small;font-family:Calibri">Thank you!</span></span><span style="color:black"></span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"> </p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><br/></p> </span>Thu, 25 Jun 2009 21:35:34 Z2009-07-04T02:34:12Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/0bfa6175-2ee1-4099-bb35-7369a57805cbhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/0bfa6175-2ee1-4099-bb35-7369a57805cbshootingsyhhttp://social.msdn.microsoft.com/Profile/en-US/?user=shootingsyhGet type of function parameter<p>I have an assembly A, which contains some functions:<br/>void log(Uri u);<br/>void log(int i);<br/>void log(CustomType t);<br/><br/>The CustomType is defined in another assembly B.<br/><br/>I open the assembly A use PEModuleUnit.Open, then I want to get the parameter types for each log function and add them into a array. <br/><br/>But I found that the ParameterSymbol.Type doesn't give the expected type. <br/><br/>I expect the parameter of type uri has the type object32-&gt;class64, and the class64 should have symbol of name &quot;System.Uri&quot;. But the result is the class64 is a function ClrCall.Function(i32)-&gt;(object32-&gt;class64) type!! <br/><br/>Can anyone tell me what happens to the type &quot;Uri&quot;? Thanks<br/><br/>The same thing happens to the CustomType, just the object32-&gt;class64 type, and the class64 type is a ClrCall.Function()-&gt;(void)</p>Tue, 26 May 2009 08:48:51 Z2009-09-10T02:54:24Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/45e27d6e-d581-4cad-8448-61cc6285799chttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/45e27d6e-d581-4cad-8448-61cc6285799cnkparrothttp://social.msdn.microsoft.com/Profile/en-US/?user=nkparrotHow to get the line No. of the function name by Phoenix?<p>I want to get the line No. of the function name using Phoenix, for example, I want to the the line No. of sample_1,<br/><br/>1  int<br/>2  sample_1<br/>3  (int a)<br/>4  {<br/>5   int i;<br/>6   for(i=0;i&lt;100;i++)<br/>7   {<br/>8    if( i == a )<br/>9   {<br/>10    a = a*i;<br/>11  }<br/>12  }<br/>13    return i;<br/>14  }<br/><br/>Yes, I can get the &quot;{&quot;'s line number, but currently I do not how to get the function name's line No.<br/>Thanks</p>Sun, 14 Jun 2009 10:19:39 Z2009-06-14T10:19:40Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/d66fa8ec-34f0-48fe-bb83-d8092f78820fhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/d66fa8ec-34f0-48fe-bb83-d8092f78820fif ifhttp://social.msdn.microsoft.com/Profile/en-US/?user=if%20ifAliasSummary Hello I've been trying to access the Summary Record of AliasSummary type, by having a custom pass, which has CxxIL ReaderPhase, followed by Alias analysis Phase, followed by a custom phase, which tries to access the summary record using callGraph.SummaryManager.HasSummary(node, Phx.Graphs.AliasSummary.Type)<br/><br/>However, this call always returns false, unless executed in a phase after CxxIL Reader Phase of the C2 codegen pass. <br/><br/>Can someone please help. I'm using the -O2 flag.<br/><br/>Regards,<br/>If IfWed, 03 Jun 2009 10:10:05 Z2009-06-11T07:07:14Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/a7c7401d-265a-4c9f-8507-4a16115d993ahttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/a7c7401d-265a-4c9f-8507-4a16115d993azhong haohttp://social.msdn.microsoft.com/Profile/en-US/?user=zhong%20haoNull Reference exception when travser a flow graph<pre><br/>foreach (Phx.Unit unit in oldModuleUnit.ChildUnits) { if (unit.IsFunctionUnit) { Phx.FunctionUnit functionUnit = ((Phx.FunctionUnit)unit); Phx.FunctionUnitState raiseToState = Phx.FunctionUnit.LowLevelIRBeforeLayoutFunctionUnitState; functionUnit = oldModuleUnit.Raise(functionUnit.FunctionSymbol, raiseToState); functionUnit.BuildFlowGraph(); Phx.Dataflow.MemoryLivenessWalker walker = Phx.Dataflow.MemoryLivenessWalker.New(functionUnit.Lifetime); walker.Traverse(Phx.Dataflow.TraversalKind.Iterative, functionUnit); //error } }<br/></pre> When I execute the above code snippet, I get a null reference exeption at the line marked as &quot;error&quot;. The error message says as follows:<br/><br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\dataflow\traverser.<br/>cpp, Line 377<br/>  this-&gt;BlockDataArray != nullptr : Called Walker::Initialize before Traverse<br/>  in (Data) &lt;unnamed unit&gt; during IR Unit Function Phases<br/>  in (PEModule) F:\tmp1\test\test\bin\Debug\test.exe<br/>  in (Program) &lt;unnamed unit&gt;<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\dataflow\traverser.<br/>cpp, Line 378<br/>  this-&gt;Direction != Dataflow::Direction::IllegalSentinel<br/>  in (Data) &lt;unnamed unit&gt; during IR Unit Function Phases<br/>  in (PEModule) F:\tmp1\test\test\bin\Debug\test.exe<br/>  in (Program) &lt;unnamed unit&gt;<br/><br/>Can anyone give me some suggestions on why I get such an error message?Mon, 01 Jun 2009 08:19:58 Z2009-06-11T07:06:15Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/7688b910-8291-436a-967c-6bc5cc71c898http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/7688b910-8291-436a-967c-6bc5cc71c898e-Abigailhttp://social.msdn.microsoft.com/Profile/en-US/?user=e-AbigailParser and Control Flow Graph Generator for C#I need a tool which accepts a C# (C++ would be fine) project, parses it and generates its control flow graph. I've discovered Phoenix yesterday and I'm still not sure whether it is possible using this framework. What I need is the control flow, tokens and line numbers.<br><br>I've seen the Control-Flow-Graph Add-In sample in order to see how to obtain a flow graph, however it only takes a function. Note that I do not need a visual representation of the flow graph. I've managed to plug it into Visual Studio 2005 however I still haven't got it working. I've created a Visual C++ project, built it successfully and from Class View I right clicked on a method and clicked on Control Flow Graph. I got &quot;Error loading flow graph&quot; in the caption of the window which is supposed to show the flow graph.<br><br>My queries are the following:<br> <ol> <li>Is it possible to get the control flow graph of a project? <li>Is it possible to retain line numbers and tokens? <li>Is it possible to get the control flow graph of a project in C#? <li>How can I resolve the error with the Add-In sample?<br></li></ol>Tue, 05 Feb 2008 15:06:24 Z2009-06-11T04:18:49Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/7e564311-adec-4648-932c-6e657c0a1ff1http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/7e564311-adec-4648-932c-6e657c0a1ff1if ifhttp://social.msdn.microsoft.com/Profile/en-US/?user=if%20ifHelp with Assertion failuresHello all,<br/>I'm trying to instrument some code, which involves creation of new temporary and assigning another variableOperand as it is to the temporary, as well as adding something to that variableOperand and assigning that to the newly created temporary. The instrumentation also introduces some branches.<br/>I'm getting the following error in the process. Can somebody please suggest or give and idea of where I might be wrong. <br/><br/>-------------------------------------------------------------------------<br/><br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\architectures\x86\function-linkage.cpp, Line 374<br/>  Unreached<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\ir\ir.cpp, Line 10578<br/>  reg != nullptr : SinkDestinationToRegister should only be used with a valid register<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\ir\ir-constructor.cpp, Line 484<br/>  variableOperand-&gt;IsTemporaryRegister<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\architectures\x86\lower.cpp, Line 515<br/>  Unreached : Unhandled Assign<br/>   tv290-(RegisterCandidate) = ASSIGN t302                                  #28<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\runtimes\base\lower.cpp, Line 1458<br/>  (nextInstruction != nullptr) : Custom processing did not return next instruction to process<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\runtimes\base\lower.cpp, Line 1481<br/>  previousInstruction != nullptr : Lower expansion is skipping instructions<br/>   tv290-(RegisterCandidate) = ASSIGN t302                                  #28<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\runtimes\base\lower.cpp, Line 1546<br/>  newInstruction-&gt;IsPseudo || newInstruction-&gt;WasLegalized || !newInstruction-&gt;IsLir || newInstruction-&gt;IsCommon : Customized expansion not f<br/>ull legalized, call Lower-&gt;Range<br/>   ESP               = add ESP, 4                                           #28<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>fatal error C1001: An internal error has occurred in the compiler.<br/>(compiler file 'd:\enlistments\sdk_june08\src\clients\c2\c2-diagnostics.cpp', line 704)<br/>Access Violation Fault (instruction at &quot;0x303B99D9&quot; read memory at &quot;0x0000000C&quot;)<br/>Internal Compiler Error in c:\Program Files\Phoenix SDK June 2008\bin\debug\x86\cl.exe.  You will be prompted to send an error report to Micr<br/>osoft later.<br/><br/>-------------------------------------------------------------------------<br/><br/><br/>Regards,<br/>If IfFri, 29 May 2009 09:22:14 Z2009-06-05T06:27:21Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/60c70216-f9f7-4e19-8b66-f2337205b268http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/60c70216-f9f7-4e19-8b66-f2337205b268J.Starhttp://social.msdn.microsoft.com/Profile/en-US/?user=J.Starerror BC31019: Unable to write to output fileI've recently installed Visual Studio on my computer for school and after completing my first tutorial I receive this error-<br/> <br/> <br/> There were build errors.  Would you like to continue and run the last successful build? Yes No<br/> <br/> Error    1    Unable to write to output file 'AppPath\WindowsApplication1.exe': Access is denied.     WindowsApplication1<br/> <br/> <br/> Well the problem is that I only ran an empty form as per the tutorial.  This is what I get from output<br/> <br/> ------ Build started: Project: WindowsApplication1, Configuration: Debug Any CPU ------<br/> C:\Windows\Microsoft.NET\Framework\v3.5\Vbc.exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Generic,System.Data,System.Drawing,System.Diagnostics,System.Windows.Forms /optioncompare:Binary /optionexplicit+ /optionstrict:custom /nowarn:42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 /optioninfer+ /rootnamespace:WindowsApplication1 /doc:obj\Debug\WindowsApplication1.xml /define:&quot;CONFIG=\&quot;Debug\&quot;,DEBUG=-1,TRACE=-1,_MyType=\&quot;WindowsForms\&quot;,PLATFORM=\&quot;AnyCPU\&quot;&quot; /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Deployment.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /main:WindowsApplication1.My.MyApplication /debug+ /debug:full /filealign:512 /out:obj\Debug\WindowsApplication1.exe /resource:obj\Debug\WindowsApplication1.Resources.resources /target:winexe Form1.vb Form1.Designer.vb &quot;My Project\AssemblyInfo.vb&quot; &quot;My Project\Application.Designer.vb&quot; &quot;My Project\Resources.Designer.vb&quot; &quot;My Project\Settings.Designer.vb&quot;<br/> vbc : error BC31019: Unable to write to output file 'C:\AppPath\WindowsApplication1\obj\Debug\WindowsApplication1.exe': Access is denied. <br/> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========<br/> <br/> In addition whenever I click on any help it tells me that I do not have document explorer installed, but it is.<br/> <br/> <br/> So I restarted my computer in safemode and ran visual studio 2008 and it ran like a charm everything worked beautifully.  So now I guess my question is what could be causing this problem in normal windows and how can I fix it?<br/> <br/> Running on Vista home premium if that makes a difference at all.<br/>Tue, 02 Jun 2009 03:54:22 Z2009-06-03T16:48:22Z