Re: Hell DLL !!!

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Dani (danielgarciagomez_at_hotmail.com)
Date: 12/03/04


Date: Fri, 3 Dec 2004 02:55:46 +0100

Ok, I have modify my code. but...

//SIMPLE.CS
using System;

    namespace p1
    {
        public class Hello {

            public static string getHello(){ return "HELLO"; }
    }
}

//CLASS1.CS
using System;
using System.Runtime.InteropServices;

namespace p2
{

    class Class1
     {

        [DllImport("simple.dll")]
        extern string Hello.getHello();

      static void Main()
      {
           Console.WriteLine(Hello.getHello());
      }

     }
}

But nothing, when i run it. I get next message..

CAN'T FIND NAMESPACE HELLO....(NEED ANY USING...?)

I hate dll, did you know it???

Thanks.

"Robby" <edmund@not.my.email.com> escribió en el mensaje
news:OP0kJaN2EHA.2112@TK2MSFTNGP15.phx.gbl...
>
> I think you have to use its complete name.
>
> Yo creo que puedes usar se llama completo.
>
> static extern string Class1.getHello();
>
>
> Robby
>
> Lo siento, Espanol no es mi idioma premiro.
>
>
>
> "Dani" <danielgarciagomez@hotmail.com> wrote in message
> news:ei1FUQN2EHA.2316@TK2MSFTNGP15.phx.gbl...
> Dani,
>
> I am goint to get crazy. I hate dll but... Ok, sorry my english, i am
> spanish. I am have been making some sample try. I implement a simple class
> in c#.
>
>
> using System;
>
> namespace p1
> {
> public class Hello {
>
> public static string getHello(){ return "HELLO"; }
> }
> }
>
> then, i compile it, i use csc /t:library simple.cs, it return me a
> fantastic simple.dll. Ok. Well Done, it works fine. But... Ok I continue.
> Then I implement a application in c# also. My code...
>
>
> using System;
> using System.Runtime.InteropServices;
>
> namespace p2
> {
>
> class Class1
> {
>
> [DllImport("simple.dll")]
> static extern string getHello();
>
> static void Main()
> {
> Console.WriteLine(getHello());
> }
>
> }
> }
>
> then i compile it and a get a nice executable. I run it a get an
>
> Excepción no controlada del tipo 'System.EntryPointNotFoundException' en
> Class1.exe
> Información adicional: No se puede encontrar el punto de entrada en el
> archivo DLL simple.dll.
>
> I'm going to translate ( I can do it, i think...)
>
> EXCEPTION : System.DllNotFoundException.
> CAN FIND ENTRY POINT IN DLL SIMPLE.DLL
>
>
> I know that import dinamic dll is posibile with Reflexion, buy i am going
> to use it under Compact Framework, and Reflexion class is not supported in
> it.
>
> Can someone help me???
>
> Thanks.
>



Relevant Pages

  • Re: Object reference not set to an instance of an oject
    ... A DLL is a file. ... A NameSpace is a logical container, ... there is a city in Pennsylvania named ... Your app also uses a Global.asax source code file. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Abstraction question
    ... Namespace myCompany.MyProgram.DAL ... its own DLL. ... It seems a lot of the patterns I have been looking over work logically ... But I want a good level of abstraction between ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Microsoft.Web.UI.WebControls doesnot work when upladed to web hosting server
    ... directory up the tree so the webcontrols dll could be in the wrong bin. ... >> This namespace is not a namespace that is part of the core library. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: New .net 2.0 syntax...namespaces? Shared methods?
    ... This project is more akin to ... The VS 2005 Web site project is very different. ... It will end up as many dll files. ... but you can still wrap your classes in a namespace ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Namespaces in a dll file
    ... same namespace, or a dll can contain multiple namespaces. ... request on the bin folder. ...
    (microsoft.public.dotnet.framework.aspnet)