Monday, 30 April 2012

How to find virtual windows Virtual Store area in registry

registry key:-


 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Local AppData

how to check in C++ for access and not use VirtualStore redirection in Win7 _access

Here's how to check and not do virtualization redirection:-

#include <io.h>


if( (_access( "c:\\yourfile.txt", 2 )) != -1)
{
     AfxMessageBox( "has write permission\n" );
}
else
{
    AfxMessageBox( "doesn't have write permission\n" );

   // here you can change the path to something else.

}

post-build pre-link step commands how to ignore // rem in c++

Add a REM to the beginning of the command e.g.

REM "C:\Program Files\Microsoft Platform SDK\Bin\mt.exe" -manifest "PDFContentSplitSA.exe.manifest" -outputresource:"Release/PDFContentSplitSA.exe";#1

How to turn off VirtualStore in C++ manifest file fix asInvoker


create file.exe.manifest:   with below contents:-


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel
          level="asInvoker"
          uiAccess="false"/>
        </requestedPrivileges>
       </security>
  </trustInfo>
</assembly>

then add the manifest to the exe (Windows SDK required for mt.exe command)



"Path of the MT.exe"
   -manifest "$(ProjectDir)[application name].exe.manifest"
   -outputresource:"$(TargetDir)$(TargetFileName)";#1

in vc6++
"C:\Program Files\Microsoft Platform SDK\Bin\mt.exe" -manifest "file.exe.manifest" -outputresource:"Release/file.exe";#1

Thursday, 12 April 2012

run 32bit COM dll's on 64bit Windows IIS7 & IIS6

For IIS7 - Open a command prompt and run the following (run as administrator):-
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true



To enable IIS 6.0 to run 32-bit:-
1.Open a command prompt and navigate to the %windir%\Inetpub\AdminScripts directory.
2.Type the following: cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 “true”

Tuesday, 10 April 2012

Sony Vegas Hang Audio Device - conflict with DigiDesign ASIO Driver fix

This is a conflict with DigiDesign ASIO Driver, do below to fix it but then digidesign may fail.


manually delete from windows/system32 these files:
digi32.dll, digiasio.dll, digiplatformsupport.dll, diomidi.dll, and directio.dll

64bit register com dll DllRegisterServer with error code 0x80070005 fix

If the privilege level is wrong, you might got an error message on DllRegisterServer with error code 0x80070005
 to fix:-

Click start menu and right mouse on "Command Line Prompt" and select "Run As Administrator" 

It should be noted that remember using that right regsvr32.exe.
64-bit version: C:\Windows\system32\regsvr32.exe
32-bit version: C:\Windows\sysWOW64\regsvr32.exe

Dev Studio 2008 Compiler error: _WIN32_WINNT settings conflicts with _WIN32_IE setting fix

change in your stdafx.h
#define _WIN32_WINNT 0x0400
to
#define _WIN32_WINNT 0x0500