Click here to Skip to main content
15,920,217 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionReplacement component for the Microsoft MSHTML component (PIA) [modified] Pin
Joost Verdaasdonk17-Sep-09 2:47
Joost Verdaasdonk17-Sep-09 2:47 
AnswerRe: Replacement component for the Microsoft MSHTML component (PIA) Pin
Joost Verdaasdonk20-Sep-09 21:57
Joost Verdaasdonk20-Sep-09 21:57 
QuestionAdding Dropdown button to ToolStrip Pin
εїзεїзεїз16-Sep-09 21:49
εїзεїзεїз16-Sep-09 21:49 
AnswerRe: Adding Dropdown button to ToolStrip Pin
Henry Minute17-Sep-09 3:13
Henry Minute17-Sep-09 3:13 
GeneralRe: Adding Dropdown button to ToolStrip Pin
εїзεїзεїз17-Sep-09 13:10
εїзεїзεїз17-Sep-09 13:10 
GeneralRe: Adding Dropdown button to ToolStrip Pin
Henry Minute17-Sep-09 13:44
Henry Minute17-Sep-09 13:44 
GeneralRe: Adding Dropdown button to ToolStrip Pin
εїзεїзεїз17-Sep-09 23:40
εїзεїзεїз17-Sep-09 23:40 
QuestionUsing Reflection to access functionality from a web-hosted library. Pin
ccdsystems15-Sep-09 13:33
ccdsystems15-Sep-09 13:33 
I work for a company that has developed a library for user authentication, and it uses this library for authenticating users that access the web site using Web Forms and ASP.NET. However, this isn't the focus of this post (or it would be obviously in the wrong place). For those who want to get to the point quickly, the real question is at the very end.

I have been tasked to create a Winforms C# application that also authenticates a user, and I am wanting to use this same library. I have installed the library locally, and it's working fine as in the following example:

private bool EncryptPassword(ref string PW)
    {
        Type Crypto;
        object[] parameter = new object[1];
        object CryptoObject;
        try
        {
            //Get the Crypto object type
            Crypto= Type.GetTypeFromProgID("CCDUserLib.Crypto");
            //Create instance from the Crypto type
            CryptoObject = Activator.CreateInstance(Crypto);

            //Pass the password we want encrypted 
            parameter[0] = PW;

            //Get the encrypted password 
            object result = Crypto.InvokeMember("EncryptedPassword",
                      System.Reflection.BindingFlags.InvokeMethod, null,
                      CryptoObject, parameter);
            PW = result.ToString();

            return true;
        }
        catch 
        {
            return false;
        }
    }


From what I understand, System.Type.GetTypeFromProgID("CCDUserLib.Crypto") searches the registry for the registered library "CCDUserLib". I am hoping that I don't have to install the CCD library locally, but instead reference the library that is already installed on our Web Server (which is not the workstation this software is going to be run on).

Is there any way to dynamically bind to a library that is installed on a different machine (like "\\CCDWebServer\bin\CCDUserLib.dll"), assuming the user has sufficient access rights to do so?

Thanks,

Daniel Bragg
AnswerRe: Using Reflection to access functionality from a web-hosted library. Pin
Dave Kreskowiak16-Sep-09 5:17
mveDave Kreskowiak16-Sep-09 5:17 
GeneralRe: Using Reflection to access functionality from a web-hosted library. Pin
ccdsystems16-Sep-09 7:44
ccdsystems16-Sep-09 7:44 
QuestionRetaining Drawn Graphics Pin
farzadmf15-Sep-09 12:23
farzadmf15-Sep-09 12:23 
AnswerRe: Retaining Drawn Graphics Pin
Luc Pattyn15-Sep-09 14:57
sitebuilderLuc Pattyn15-Sep-09 14:57 
QuestionRe: Retaining Drawn Graphics Pin
farzadmf16-Sep-09 0:23
farzadmf16-Sep-09 0:23 
AnswerRe: Retaining Drawn Graphics Pin
Luc Pattyn16-Sep-09 1:52
sitebuilderLuc Pattyn16-Sep-09 1:52 
GeneralRe: Retaining Drawn Graphics Pin
farzadmf16-Sep-09 12:50
farzadmf16-Sep-09 12:50 
Questionwindows service not working Pin
iiiii15-Sep-09 0:00
iiiii15-Sep-09 0:00 
AnswerRe: windows service not working Pin
Dave Kreskowiak16-Sep-09 5:10
mveDave Kreskowiak16-Sep-09 5:10 
GeneralRe: windows service not working Pin
iiiii16-Sep-09 18:47
iiiii16-Sep-09 18:47 
GeneralRe: windows service not working Pin
Dave Kreskowiak17-Sep-09 1:10
mveDave Kreskowiak17-Sep-09 1:10 
QuestionUrgent : How to improve performence ?? Pin
Tejaswini Prashant J14-Sep-09 20:11
Tejaswini Prashant J14-Sep-09 20:11 
AnswerRe: Urgent : How to improve performence ?? Pin
Luc Pattyn15-Sep-09 15:01
sitebuilderLuc Pattyn15-Sep-09 15:01 
AnswerRe: Urgent : How to improve performence ?? Pin
Eddy Vluggen16-Sep-09 4:34
professionalEddy Vluggen16-Sep-09 4:34 
QuestionUpdating PictureBox control every one minute in windows form Pin
Member 418166914-Sep-09 6:29
Member 418166914-Sep-09 6:29 
AnswerRe: Updating PictureBox control every one minute in windows form Pin
Richard MacCutchan14-Sep-09 8:56
mveRichard MacCutchan14-Sep-09 8:56 
GeneralRe: Updating PictureBox control every one minute in windows form Pin
Luc Pattyn15-Sep-09 15:02
sitebuilderLuc Pattyn15-Sep-09 15:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.