.net - In C# While Using Interop HTML 2 XHTML Lib Dll Source Code Giving Error -



.net - In C# While Using Interop HTML 2 XHTML Lib Dll Source Code Giving Error -

when seek convert html xhtml tag i'm getting next error...

error: retrieving com class mill component clsid {59939390-0e6a-4f1b-a742-20c5459501f7} failed due next error: 80040154.

after googling found few solutions:

registering dll regsvr32 "e:source code\bin\interop.html2xhtmllib.dll"

i'm tried register dll. e:source code\bin\interop.html2xhtmllib.dll loaded. dllregisterserver entry point not found error message displayed. why..?

recompiled project x86 , x64.. no use..

vb.net code:

dim xhtmlutil new xhtmlutilities // here im getting above error. sformattedoutput = xhtmlutil.converttoxhtml(sinputline) //send conversion

my operating scheme windows xp 32-bit service pack 3. application done in vs2008. i'm working vs2010.

here i'm missing. 1 help me figure out problem?

thanks in advance.

i'm tried register dll. e:source code\bin\interop.html2xhtmllib.dll loaded. dllregisterserver entry point not found error message displayed. why?

the interop.html2xhtmllib.dll file isn't library want register using regsvr32. managed interop assembly, generated create com objects accessable .net application. need register type library html2xhtmllib.dll.

to this, have 2 options:

find redistributeable package, contains library , install application. on development system, open "add references" dialog of visual studio. take com tab , search library (just did when you've added reference). there find absolute path library. re-create library client scheme , register using regsvr32.

since not know source of html2xhtmllib, can suggest ways. should prefer first one.

since you've started bounty on this, want go little bit more detail on com , interop.

differences between com , .net assemblies

there 2 types of servers in com: inproc-servers , outproc-servers. inproc (in process) servers know als dll. outproc (out of process) servers standing alone, running in own process. know them executables.

you want consume inproc-server. com-server (html2xhtmllib) consists out of 2 parts:

a type library (.tlb), contains meta-information server, it's contained objects , accessability. a library, containing code objects implemented. library exports next static functions: dllgetclassobject – tries create instance of object, defined within server dllcanunloadnow – tells com environment, whether or not server can released, because isn't used other process more. dllregisterserver – called regsvr32 register mentioned type library in windows registry, create visible clients , com environment. dllunregisterserver – exact opposite, when called through regsvr32 -u.

the type library can resource of dll or exe file, there's 1 file. c# developers seems somehow confusing, since meta-information straight compiled a.net assembly , accessable through reflection.

the interop: wrapper between .net , com

so basicly type libraries describe needed .net reflection access objects exposed through com. problem is, com-components stored in different format:

usually straight compiled machine code: cannot link .net assembly, compiled anycpu against com-server. com-servers straight compiled either x86-assembler, or x86-64-assembler. have fixed pointer sizes , compatible 1 of compilation-models. com defines rules memory management. each com-object must implement iunknown-interface. interface defines 3 methods. methods addref , release memory management purposes. whenever client accesses com object needs phone call addref. increases counter one. when client not need object anymore, calls release instead of deleting object, resulting in counter decrement. if pointer reaches 0, object delete's itself. different how .net manages memory. in .net garbage collector visits each object on heap in non-deterministic manner (you cannot determinate exact point of time object get's deleted) , releases object, when there no references left it. com defines rules identity. whenever want access base of operations interface of object, have phone call queryinterface method, defined iunknown. method guaranteed allways homecoming same pointer, when specific interface get's queried. might true .net (besides overloading operators), way .net ensures object identity different. com defines rules object relations. crazy stuff aggregation , containment, exist in .net, implemented differently. com defines different multithreading rules, single threaded appartments , multi threaded appartments. threading models define how objects interact, when coexisting in different manners. in .net have perform each synchronisation process manually.

this list may not complete, neither want go detail further, because incidental question, see, there big differences between .net , com. , manage differences there layer between both worlds: com interop.

if calling com server .net, interop nil more .net assembly, hard work under hood. get's created using tlbimp.exe tool. visual studio typically calls whenever referencing library com tab. result library wanted register: interop.libary.dll. library redefines types of type library of com server, implements rules required com , performs actual calls you. managed .net library not define methods, described earlier. why regsvr32 cannot find dllregisterserver entry point.

the way described above one-way unmanaged com server , managed .net client. there other way, counterparts tlbexp.exe , regasm.

c# .net vb.net dll regsvr32

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -