Using the same client for both regfree and out-of-proc COM

Hi,
Here is the context:
1. We have the same set of COM objects that can be deployed as in-proc COM servers (dlls) or out-of-proc COM servers (exe).  In-proc servers are called through regfree COM.
2. We have test projects that use the in-proc COM servers through regfree COM.
I would like to use the same test client projects for both regfree and out-of-proc COM servers (but not at the same time). For example, I would like to first run the client using regfree COM, then delete the in-proc dll and register the out-of-proc com server,
and then run the client again without having to recompile.  But I have not found a way to do this.
Instead, what I have to do is modify the project settings of the test client project, removing the regfree stuff (the manifest dependencies) before I can use the test client project with the out-of-proc server.
Is there a way to do this without recompiling?
FYI, I have tried regfree COM by changing the client project's Project->Properties->Linker->Manifest file->Additional Manifest Dependencies, or by changing the client project's Project->Properties->Manifest Tool->Input and Output->Additional
Manifest Files.  Either way works with regfree COM.  And either way I have to remove those settings before making it work with out-of-proc COM (and hence recompiling, which is what I am trying to avoid).
Thanks,
Nick

Try Manifest Tool > Input and Output > Embed Manifest = No, and change Linker > Manifest File > Manifest File to drop ".intermediate" in the middle (or just rename the file after the build).
A manifest doesn't have to be embedded into the executable, it could be a standalone file named like ApplicationName.exe.manifest and sitting in the same directory next to the .EXE. Then you can simply delete or rename it back and forth to switch between
registered and reg-free COM.
Igor Tandetnik

Similar Messages

  • HT4314 I have a iPad and iPhone with the same Apple ID, but on Game Center I have used the same id for both devices and they are two different profiles and I was wondering how to have one of the accounts on both devices.

    I have a iPad and iPhone with the same Apple ID, but on Game Center I have used the same id for both devices and they are two different profiles and I was wondering how to have one of the accounts on both devices.

    Hi Jamesdwills,
    Welcome to the Support Communities!
    If you are using the same Apple ID on both devices, the Game Center profile should be the same.
    Check out this information from the iPad User Guide.  Try signing out of the Game Center on both devices and then sign back in with the correct Apple ID:
    Using Game Center
    http://support.apple.com/kb/ht4314
    Game Center settings - iPad User Guide
    http://help.apple.com/ipad/7/#/iPad9a13d039
    Game Center settings
    Go to Settings > Game Center, where you can:
    Sign out (tap your Apple ID)
    Allow invites
    Let nearby players find you
    Edit your Game Center profile (tap your nickname)
    Get friend recommendations from Contacts or Facebook
    Specify which notifications you want for Game Center. Go to Settings > Notifications > Game Center. If Game Center doesn’t appear, turn on Notifications.
    Change restrictions for Game Center. Go to Settings > General > Restrictions.
    Cheers,
    - Judy

  • How to Use the same iview for both KM End User and the KM Administrator

    Hi friends,
    *This is my scenario :* How to Use the same iview for both KM End User and the KM Administrator but with different Context
    Menu Options.
    i followed these steps but im getting same context menu for both KM End User and the KM Administrator .
    Assign the role Content Administrator to the user km_admin. This is needed so that km_admin can change
    the presentation settings for the KM Folder u201EReports_kmFolder‟.
    Now, login with user km_admin. Navigate to the Km Folder reports_kmFolder through Content Administration
    -> Km Content. Click on Details link of the folder reports_kmFolder.
    Go To Settings -> Presentation. Click on the tab u201ESettings for You‟-> Click on button u201ESelect Profile‟.
    Select the radio button corresponding to u201Elayout Set‟, and choose u201EConsumerExplorer‟ from the dropdown.
    Click u201EOK‟.
    Select both the check boxes corresponding to Items Affected as shown above, and click u201ESave‟
    Now, remove the u201ESuper Administrator‟ role from the user km_admin and login with this user.
    How rto resolve this????
    Regards,
    Prasad.

    Hello Prasad,
    Most likely the user km_admin still has system principal roles assigned, even though you removed the Super Admin role, you should check that this user doesn't have any other admin roles, otherwise it will be considered a System Principal user and will therefore still have access to all content. For more information see http://help.sap.com/saphelp_nw70/helpdata/en/19/56f28fbd4e11d5993b00508b6b8b11/frameset.htm
    Try creating a new user with just read access to the content and you should see that it will not be able to make any changes etc.
    Regards,
    Lorcan.

  • When I down load books, can I read them on my iPad and iPhone? I went to open a book on my phone but I got a message that aid something about the bill already associated with an appleid. I use the same id for both devices.

    When I down load books, can I read them on my iPad and iPhone? I went to open a book on my phone but I got a message that aid something about the bill already associated with an appleid. I use the same id for both devices.

    All I can suggest is that you open that file on the MBA and save it as a new file, then see if you can open the new one on the iMac.

  • How to use the same keypair for both encrypt/decryprt-SunPKCS#11

    Dear All,
    Subject: To access iKey 2032 token, to retrieve public/private key from iKey 2032 token using pkcs#11 in sdk1.5, to encrypt/decrypt files.
    When I separate the encrypt and decrypt part of java program, encryption program works well, whereas decryption program does not decrypt anything in the decrypt file (But there is no error). I printed out the public and private key in both encrypt and decrypt part of java program, its displayed differently::
    Encrypt program:
    SunPKCS11-rainbow_token RSA public key, 1024 bits (id 10, session object)
    modulus: 114338469922835728259534620463489934081917342509275191892563243582065
    74380495029336519036972702864998634664269499641616889325482699399559620370181624
    72068116957594402738459932902481604823224406859575930392708524033619120886256353
    58738237376491107769961041015109436347533548940674900728805627968145581222172729
    public exponent: 65537
    SunPKCS11-rainbow_token RSA private key, 1024 bits (id 11, session object, sensi
    tive, unextractable)
    Decrypt Program::
    SunPKCS11-rainbow_token RSA public key, 1024 bits (id 12, session object)
    modulus: 138556361758970660122782926386849783732271581948935425587968692317930
    09262429353977097956605140384961825974398004270547046620971835394362397699233738
    54481804748731546655197744692886754946373745924825650876065903334173666990347814
    83727290962956934521650035029131176614982652900659797194703065074407857754883163
    public exponent: 65537
    SunPKCS11-rainbow_token RSA private key, 1024 bits (id 13, session object, sensi
    tive, unextractable)
    I suspect that every time program generates different set of key, therefore we need to store the generated key during encryption part (i believe it is to be in the keystore) and to use the same for decryption part. Could you please give me a tips how to do this?
    Encrypt Program ::
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import java.sql.*;
    import java.text.*;
    import java.math.*;
    import java.security.*;
    import java.security.cert.*;
    import java.security.interfaces.*;
    import javax.crypto.interfaces.*;
    import javax.net.ssl.*;
    import javax.crypto.*;
    import javax.crypto.spec.DESKeySpec;
    import java.security.KeyStore.*;
    * A class of Encrypt.
    public class Encrypt
    public Encrypt(){}
    public void loginToken() {
         Provider p = new sun.security.pkcs11.SunPKCS11(MQConfig.getvalue("SecurityPropertyPath"));
         Security.addProvider(p);
         KeyStore ks = null;
         try{
              String password = General.ReadFiles(MQConfig.getvalue("logFilePath"),"Simple");
              password = password.trim();
              char pin[] = password.toCharArray();
              ks = KeyStore.getInstance("pkcs11");
              ks.load(null,pin);
         KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA",p);
              KeyPair kp = kpg.genKeyPair();
              kpg.initialize(1024, new java.security.SecureRandom());
              FileInputStream in = new FileInputStream("C:\\ReportDBBE.properties");
              FileOutputStream out = new FileOutputStream("C:\\ReportDBAE.properties");
              Cipher cp=Cipher.getInstance("RSA/ECB/PKCS1Padding", p);
              cp.init(cp.ENCRYPT_MODE,kp.getPublic());
              CipherOutputStream cout=new CipherOutputStream(out,cp);
              byte[] input=new byte[8];
              int byteread=in.read(input);
              while(byteread!=-1){
                   cout.write(input,0,byteread);
                   byteread=in.read(input);
              cout.flush();
              in.close();
              cout.close();
         catch(NoSuchAlgorithmException nsae)
         System.out.println("No Such Algorithm Exception " + nsae.getMessage());
         catch(NoSuchPaddingException nspe)
         System.out.println("No Such Padding Exception " + nspe.getMessage());
         catch(InvalidKeyException ike)
         System.out.println("Invalid Key Exception " + ike.getMessage());
         catch(IllegalStateException ise)
         System.out.println("Illegal State Exception " + ise.getMessage());
         catch(KeyStoreException kse)
         System.out.println("Key Store Exception " + kse.getMessage());
         catch(CertificateException ce)
         System.out.println("Certificate Exception " + ce.getMessage());
         catch(IOException ioe)
         System.out.println("IO Exception " + ioe.getMessage());
    public static void main (String args[]) throws Exception {
         try{
         Encrypt tl = new Encrypt();
         tl.loginToken();
         }catch(Exception e){
         e.printStackTrace();
    Decrypt Program ::
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import java.sql.*;
    import java.text.*;
    import java.math.*;
    import java.security.*;
    import java.security.cert.*;
    import java.security.interfaces.*;
    import javax.crypto.interfaces.*;
    import javax.net.ssl.*;
    import javax.crypto.*;
    import javax.crypto.spec.DESKeySpec;
    import java.security.KeyStore.*;
    * A class of Decrypt.
    public class Decrypt
    public Decrypt(){}
    public void loginToken() {
         Provider p = new sun.security.pkcs11.SunPKCS11(MQConfig.getvalue("SecurityPropertyPath"));
         Security.addProvider(p);
         KeyStore ks = null;
         try{
              String password = General.ReadFiles(MQConfig.getvalue("logFilePath"),"Simple");
              password = password.trim();
              char pin[] = password.toCharArray();
              ks = KeyStore.getInstance("pkcs11");
              ks.load(null,pin);
         KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA",p);
              KeyPair kp = kpg.genKeyPair();
              kpg.initialize(1024, new java.security.SecureRandom());
              FileInputStream in1 = new FileInputStream("C:\\ReportDBAE.properties");
              FileOutputStream out1 = new FileOutputStream("C:\\ReportDBAD.properties");
              Cipher cipher=Cipher.getInstance("RSA/ECB/PKCS1Padding", p);
              AlgorithmParameters algParams = cipher.getParameters();
              cipher.init(Cipher.DECRYPT_MODE,kp.getPrivate(),algParams);
              CipherInputStream cin1=new CipherInputStream(in1,cipher);
              byte[] input1=new byte[8];
              int byteread1=cin1.read(input1);
              while(byteread1!=-1){
                   out1.write(input1,0,byteread1);
                   byteread1=cin1.read(input1);
              out1.flush();
              in1.close();
              out1.close();
              cin1.close();
         catch(NoSuchAlgorithmException nsae)
         System.out.println("No Such Algorithm Exception " + nsae.getMessage());
         catch(NoSuchPaddingException nspe)
         System.out.println("No Such Padding Exception " + nspe.getMessage());
         catch(InvalidKeyException ike)
         System.out.println("Invalid Key Exception " + ike.getMessage());
         catch(IllegalStateException ise)
         System.out.println("Illegal State Exception " + ise.getMessage());
         catch(InvalidAlgorithmParameterException iape)
         System.out.println("Invalid Algorithm ParameterException " + iape.getMessage());
         catch(KeyStoreException kse)
         System.out.println("Key Store Exception " + kse.getMessage());
         catch(CertificateException ce)
         System.out.println("Certificate Exception " + ce.getMessage());
         catch(IOException ioe)
         System.out.println("IO Exception " + ioe.getMessage());
    public static void main (String args[]) throws Exception {
         try{
         Decrypt tl = new Decrypt();
         tl.loginToken();
         }catch(Exception e){
         e.printStackTrace();
    Configuration file::
    name = rainbow_token
    library = c:\winnt\system32\dkck201.dll
    attributes(*,CKO_PRIVATE_KEY,*) = {
    CKA_SIGN = true
    attributes(*,CKO_PRIVATE_KEY,CKK_DH) = {
    CKA_SIGN = null
    attributes(*,CKO_PRIVATE_KEY,CKK_RSA) = {
    CKA_DECRYPT = true
    }

    Hi all,
    Now i manage to use the same keypair for both encrypt/decryprt-SunPKCS#11. Below is my code woks well. In my code i hard coded alias name of certificate, did anyone knows how to read alias name of certificate from iKey token 2032??
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import java.sql.*;
    import java.text.*;
    import java.math.*;
    import java.security.*;
    import java.security.cert.*;
    import java.security.interfaces.*;
    import javax.crypto.interfaces.*;
    import javax.net.ssl.*;
    import javax.crypto.*;
    import javax.crypto.spec.DESKeySpec;
    import java.security.KeyStore.*;
    * A class of Encrypt.
    public class Encrypt
    public Encrypt(){}
    public void loginToken() {
         Provider p = new sun.security.pkcs11.SunPKCS11(MQConfig.getvalue("SecurityPropertyPath"));
         String myAlias = "349eefd1-845b-4ba4-9f88-06e9f5cb82f6";
         /** to view alias name
         keytool -list -v -keystore NONE -storetype PKCS11 -storepass PASSWORD
         Security.addProvider(p);
         KeyStore ks = null;
         PrivateKey privKey = null;
         PublicKey pubKey = null;
         try{
              String password = General.ReadFiles(MQConfig.getvalue("logFilePath"),"Simple");
              password = password.trim();
              char pin[] = password.toCharArray();
              ks = KeyStore.getInstance("pkcs11");
              ks.load(null,pin);
              java.security.cert.Certificate cert = ks.getCertificate(myAlias);
              Key key = ks.getKey(myAlias, pin);
              if(key != null) {
                   System.out.println("key class: " + key.getClass().getName()); // -> sun.security.pkcs11.P11Key$P11PrivateKey
                   System.out.println("key bytes: " + key.getEncoded()); // -> null!!!!!!!
         if(PrivateKey.class.isInstance(key)) {
         privKey = (PrivateKey)key;
         System.out.println("algo: " + privKey.getAlgorithm()); // -> RSA
         //Signature rsasig = Signature.getInstance("SHA1withRSA");
         //rsasig.initSign(privKey);
         //rsasig.update(data.getBytes());
         //byte[] sigBytes = rsasig.sign();
         pubKey = cert.getPublicKey();
         //System.out.println("signed bytes: " +sigBytes);
         //return sigBytes;
         //KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA",p);
              //KeyPair kp = kpg.genKeyPair();
              //KeyPair kp = kpg.generateKeyPair();
              //kpg.initialize(1024, new java.security.SecureRandom());
              FileInputStream in = new FileInputStream("C:\\ReportDBBE.properties");
              FileOutputStream out = new FileOutputStream("C:\\ReportDBAE.properties");
              Cipher cp=Cipher.getInstance("RSA/ECB/PKCS1Padding", p);
    //cp.init(cp.ENCRYPT_MODE,kp.getPublic());
              cp.init(cp.ENCRYPT_MODE,pubKey);
              CipherOutputStream cout=new CipherOutputStream(out,cp);
              byte[] input=new byte[8];
              int byteread=in.read(input);
              while(byteread!=-1){
                   cout.write(input,0,byteread);
                   byteread=in.read(input);
              cout.flush();
              in.close();
              cout.close();
         catch(NoSuchAlgorithmException nsae)
         System.out.println("No Such Algorithm Exception " + nsae.getMessage());
         catch(NoSuchPaddingException nspe)
         System.out.println("No Such Padding Exception " + nspe.getMessage());
         catch(InvalidKeyException ike)
         System.out.println("Invalid Key Exception " + ike.getMessage());
         ike.printStackTrace();
         catch(IllegalStateException ise)
         System.out.println("Illegal State Exception " + ise.getMessage());
         catch(KeyStoreException kse)
         System.out.println("Key Store Exception " + kse.getMessage());
         catch(CertificateException ce)
         System.out.println("Certificate Exception " + ce.getMessage());
         catch(IOException ioe)
         System.out.println("IO Exception " + ioe.getMessage());
         catch(UnrecoverableKeyException unrke)
         System.out.println("Unrecoverable Key Exception " + unrke.getMessage());
    public static void main (String args[]) throws Exception {
         try{
         Encrypt tl = new Encrypt();
         tl.loginToken();
         }catch(Exception e){
         e.printStackTrace();
    Your help is very much appreciated!!!!

  • My Itouch 3rd gen can't be recognize by my computer but when I put my iphone4 its can be recognize I use the same cable for both of them.

    My Itouch 3rd gen can't be recognize by my computer but when I put my iphone4 its can be recognize I use the same cable for both of them.

    Does it charge?
    - Reset the iOS device. Nothing will be lost      
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar

  • Why is my user id/pw not accepted by ICloud on my iPad but it is accepted by iCloud on my computer?  I am using the same password for both.

    Why is my user id/pw not accepted by ICloud on my iPad but it is accepted by iCloud on my computer?  I am using the same password for both.

    Rebooting your iDevice
    Hold down the Sleep (On-Off) and Home buttons together for about 10-15 seconds or until the Apple Logo appears - ignore the red slider if it appears - then let go of the buttons. The device should begin to start up.
    Now try entering the information again. See if it works now.

  • I am using the same account for both my Apple TVs but not able to open the movie I purchased on both tvs?

    I have two Apple TV's one in my living room and one in our bedroom. I purchased a movie series on the tv in the living room but was not able to open on the tv in the bedroom. I am using the same account for both Apple TV's. Can anyone assist?

    Wecome to the Apple Community.
    For the avoidance of doubt, are you able to play the TV show on the Apple TV on which you bought it and it is a TV show and not a movie is it.
    What do you mean can't open it, what exactly happens.

  • Do I use the same password for apple ID and for iCloud?

    I am not getting mail on my iphone or my ipad air!
    When I put the password for my apple ID into icloud- it keeps reverting to another password. i.e. doesn't hold the apple ID password.
    Is this a problem keeping the mail from getting to my phone and ipad?
    DO I USE THE SAME PASSWORD FOR APPLE ID AND ICLOUD?
    Help. and MERRY CHRISTMAS

    What are you trying to do when you say "When I put the password for my apple ID into icloud- it keeps reverting to another password"?
    Where are you doing when you try to enter your password?

  • Can I use the same itunes for my ipad and iphone?  Will the computer erase my other device information?

    Can I use the same itunes for my ipad and iphone on my computer?  Will the computer erase my other device information?

    The computer will not erase the information.  Each device will show up in iTunes as a separate device and you can control the information for each device through iTunes.

  • My iPod won't charge on a wall charger, only on the computer. I used the same cord for both though. I used to be able to charge it with a wall charger, but now suddenly I can't. I've even used other wall pieces. Nothing seems to work.

    My iPod will no longer charge with a wall charger, only the computer. I know it's not becuase of the wall piece or my cord, since I also use the same cord for computer charging, and the wall piece seems to work with others devices. It worked a couple of weeks ago, then suddenly quit. I think it may be something to do with the inside of my iPod where the charger goes. I find it really inconvient to always have to use the computer to charge my iPod. I believe I have a three year warrenty on my iPod, but I wouldn't think it would cover this problem. Is there anything I can do to fix it?

    Not Charge
    - See:    
    iPod touch: Hardware troubleshooting
    iPhone and iPod touch: Charging the battery
    - Try another cable.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store. Bring the wall charger
      Apple Retail Store - Genius Bar
    If you have a three-year warrany it is not from Apple. The standare Apple warrantyis 1 year and y can purchas an extended warranty that give y a total of two years. You can check your Apple warranty coverage hee:
    Check Your Service and Support Coverage

  • I want to perform bidirectional i/o using a pci-6534.The problem is that i need to use the same lines for i/p and o/p. is that possible?

    I want to perform bidirectional i/o using a pci-6534.The problem is that i need to use the same lines for i/p and o/p. is that possible? And if it is how an i doing this?

    Hi I Pant,
    The idea that crossed my mind was to tie each of the lines coming from/going to "your device" to two of the DIO lines. Configure one these two ports as input, the other as output.
    When you want to read the state of the line, read from the line configured as input. Similarly, use the other port when it is time to write.
    Provided "your device" uses tri-state drivers/receivers, or can be used in a "wired-OR" configuration, this may work.
    What is "your device"?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Can v use the same Client for setting the ALE ??

    Can i use the same client like 080 for my ALE configuaration ?

    Configuring is a Cross-Client(Client Independent) activity.
    Check whether you have necessary access/authorizations to Configure.
    This should be always done in Development client.
    Hope this helps.
    Regards
    Vinayak

  • Using the Same Profile for Outlook Connector and Exchange

    Is anyone using the same profile in Outlook for both the Oracle Connector for Outlook and Exchange server? Only Exchange would have an IMAP mail service defined.
    Oracle tech support kindly provided me with the following information but I would really appreciate hearing about customer experiences:
    "In theory this should work without causing any problem if only one service within the same Profile is configured for mail. However, before configuring a large amount of users with such a configuration, please start with 1 user and perform some tests, as I am not aware of anyone using such a configuration. The fact that you want your Oracle calendar users to invite Exchange users, will be like inviting External users, the Free/Busy information for these users will not be available etc. Also inviting external user is an already existing feature of the Oracle Calendar."
    Thanks very much.
    Brenda

    We are doing it currently as we are switching over from Exchange 5.5 to OCS. We set up a profile using the Oracle connector and then go into properties and add the Exchange account. We used this method to move files from the Exchange server to the Oracle server by having both profiles running.

  • Using the same Realm for passwd auth and ssl auth

    Hi,
    does someone can tell me if it's possible to use the same Realm to authenticate
    some client with username,password and other client with certificates.In other
    word can a same realm support 2 different authentication method
    Thanks a lot
    romain

    Yes.
    The AbstractListableRealm, which I assume you're extending,
    has three methods:
    authUserPassword :
    checks passwords
    authSSLCertificate :
    is passed in the certificate verified by the SSL
    handshake. The default implementation of this
    method hands the certificate to the CertAuthenticator
    (if there is one). The CertAuthenticator typically
    uses one of the fields in the certificate to come up with
    a user name (eg. the email address minus the @ stuff),
    then verifies that there is a user with that name in
    the realm. Since SSL verfied the certificate, this
    method doesn't do any further checking. I think we
    ship a SimpleCertAuthenticator sample that you can
    look at.
    authCertificates :
    Like authSSLCertificates except that the certificate
    came from someplace else. I'm not sure under what
    conditions this is called.
    Normally, the realm worries about the user/password
    authentication then relies on the CertAuthenticator for
    the certificate stuff. The CertAuthenticator maps the
    certificate to a user name then goes to the realm to
    make sure that there really is a user with that name.
    -Tom
    "romain" <[email protected]> wrote:
    >
    Hi,
    does someone can tell me if it's possible to use the same Realm to authenticate
    some client with username,password and other client with certificates.In
    other
    word can a same realm support 2 different authentication method
    Thanks a lot
    romain

Maybe you are looking for