Click here to Skip to main content
16,012,759 members
Home / Discussions / C#
   

C#

 
GeneralGDI+ / Drawing text vertical Pin
ljfhm20-Jun-04 0:56
ljfhm20-Jun-04 0:56 
GeneralRe: GDI+ / Drawing text vertical Pin
Nick Parker20-Jun-04 5:10
protectorNick Parker20-Jun-04 5:10 
Generalcodeproject webServices Pin
Lior Shoval19-Jun-04 12:24
Lior Shoval19-Jun-04 12:24 
GeneralRe: codeproject webServices Pin
Heath Stewart21-Jun-04 4:24
protectorHeath Stewart21-Jun-04 4:24 
GeneralRe: codeproject webServices Pin
Lior Shoval21-Jun-04 8:18
Lior Shoval21-Jun-04 8:18 
GeneralHandling Windows Messages Automatically Question Pin
mtbjr19-Jun-04 12:04
mtbjr19-Jun-04 12:04 
GeneralRe: Handling Windows Messages Automatically Question Pin
Nick Parker19-Jun-04 19:27
protectorNick Parker19-Jun-04 19:27 
GeneralUsing a .NET assembly in GINA Pin
Ami Bar19-Jun-04 11:36
Ami Bar19-Jun-04 11:36 
Hi,

I am trying to write a GINA stub that uses a .NET assembly.
The GINA stub delegates all its functions to the original msgina.dll
When I am trying to acces a .NET assembly from the GINA, I get the HRESULT 0x800401E4 (Invalid Syntax).

When I put the same code of the GINA that access the assembly in a regular application (Unmanaged C++ WIN32 Console) it works.
When I run the same code from the GINA I get the HRESULT 0x800401E4 (Invalid Syntax). I also tried to work with the CorBindToRuntimeEx() functions, but when I get to load the assembly or create the object instance it gives the same error.

Does anyone encountered this problem?
Maybe it something with secutity that I don't know about?


Here is a snippet of my code


GINA.cpp
-------------

...
#pragma warning (disable: 4278)<br />
#import <mscorlib.tlb> raw_interfaces_only<br />
#import "Checker.tlb" no_namespace named_guids<br />
<br />
int Check(long param)<br />
{<br />
    ICheck *check = NULL;<br />
<br />
    HRESULT hr = CoCreateInstance(<br />
        CLSID_Check,<br />
        NULL, <br />
        CLSCTX_INPROC_SERVER,<br />
        IID_ICheck, <br />
        reinterpret_cast<void**>(&check));<br />
<br />
    // I get the error here<br />
    if (FAILED(hr)) <br />
        return false;<br />
<br />
    int result = check->Check(param);<br />
<br />
    check->Release();<br />
<br />
    return result;<br />
}
...


Check.cs
--------

...
    [Guid("E726B4A3-5536-4f06-9554-A57526B27D92")]<br />
    public interface ICheck<br />
    {<br />
        int Check(int param);<br />
    }<br />
<br />
    [Guid("47339B99-97BB-4148-BAA4-A793295ABA38")]<br />
    public class Check : ICheck<br />
    {<br />
        int Check(int param)<br />
        {<br />
            int result = 0;<br />
            // Do some tests with param and update result<br />
            <br />
            return result;<br />
            <br />
        }<br />
    }
...
GeneralHELP: Remote Connection SOS Pin
slw1234@sbcglobal.net19-Jun-04 9:19
slw1234@sbcglobal.net19-Jun-04 9:19 
GeneralRe: HELP: Remote Connection SOS Pin
Dave Kreskowiak21-Jun-04 4:33
mveDave Kreskowiak21-Jun-04 4:33 
Generalform load and Resize event Pin
ABean19-Jun-04 5:15
ABean19-Jun-04 5:15 
GeneralRe: form load and Resize event Pin
leppie19-Jun-04 5:45
leppie19-Jun-04 5:45 
GeneralRe: form load and Resize event Pin
Heath Stewart19-Jun-04 8:21
protectorHeath Stewart19-Jun-04 8:21 
GeneralRe: form load and Resize event Pin
leppie19-Jun-04 8:31
leppie19-Jun-04 8:31 
GeneralRe: form load and Resize event Pin
Heath Stewart19-Jun-04 8:33
protectorHeath Stewart19-Jun-04 8:33 
GeneralRe: form load and Resize event Pin
Heath Stewart19-Jun-04 8:23
protectorHeath Stewart19-Jun-04 8:23 
GeneralPretty Weird Request Here... Pin
matthias s.19-Jun-04 5:08
matthias s.19-Jun-04 5:08 
GeneralRe: Pretty Weird Request Here... Pin
ABean19-Jun-04 5:31
ABean19-Jun-04 5:31 
GeneralRe: Pretty Weird Request Here... Pin
leppie19-Jun-04 5:43
leppie19-Jun-04 5:43 
GeneralRe: Pretty Weird Request Here... Pin
ABean19-Jun-04 6:11
ABean19-Jun-04 6:11 
GeneralRe: Pretty Weird Request Here... Pin
Heath Stewart19-Jun-04 8:25
protectorHeath Stewart19-Jun-04 8:25 
GeneralRe: Pretty Weird Request Here... Pin
leppie19-Jun-04 5:42
leppie19-Jun-04 5:42 
GeneralRe: Pretty Weird Request Here... Pin
Heath Stewart19-Jun-04 8:27
protectorHeath Stewart19-Jun-04 8:27 
GeneralRe: Pretty Weird Request Here... Pin
matthias s.19-Jun-04 23:37
matthias s.19-Jun-04 23:37 
GeneralRe: Pretty Weird Request Here... Pin
Heath Stewart20-Jun-04 10:00
protectorHeath Stewart20-Jun-04 10:00 

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.