Load modules using moduleLoader url property?

My requirement is to load a module using URL like following
'/somthing.swf?a=b&b=c'
so that it can load the module and set a few values after it is loaded. But when i create an instance of the moduleLoader and set the Url property nothing is happening. My code is as follows
                        url += constructUrl()+"?"; // something like 'modules/vst/visitModule.swf' will be returned
               if(_modLoader){
                    _modLoader.addEventListener(ModuleEvent.READY,readyMod);
                    _modLoader.addEventListener(ModuleEvent.ERROR,loadError);
                    _modLoader.addEventListener(ModuleEvent.PROGRESS,loadProgress);
                    _modLoader.addEventListener(ModuleEvent.UNLOAD,unload);
                    _modLoader.applicationDomain = ApplicationDomain.currentDomain;                    
                    _modLoader.url = url;
Do you see something wrong here? I'm using Flex 3.2.
I've read in the following forum for the solution http://forum.springsource.org/archive/index.php/t-65228.html but could not get it to work. Still trying.
Thanks

Well the if statement guarding the loadModule() call looks like this:
        if (_url != null && loadRequested)
            loadModule();
Assuing url is not null, loadRequested must be false. This seems to imply that you don't have ModuleLoader declared in an mxml file. Is the ModuleLoader created using actionscript? If so you need to call loadModule().
-Darrell

Similar Messages

  • Loading modules using ModuleManager

    Hi,
       I am having a strange issue with ModuleManager,  When using ModuleManager  "ready" event is not getting fired on first time.  It works if I try loading agin. Why is this ?
    -Gireesh

    Hi,
      I am using Flex 3.5. I am not sure if its a GC issue, Its very small test application , If I use  ModuleLoader and create the ModuleLoader in MXML and load the module it works,  But if I create 'ModuleLoader' using 'new' keyword or use ModuleManager.getModule method it doesnt work, but it works if I call it again.
    -Gireesh

  • How to load different modules in moduleLoader - some with other without unload?

    Ok so I've read a lot about modules and I decided to build a site where I have a button bar menu and a single moduleLoader, where all of my pages are separate modules. Some of the modules will be preloaded with moduleManager technique so they will be in memory and should pop up instantly and others should be unloaded since they will be used rarely. Imagine you have 50 pages, 45 of them use the same 3 modules and the rest 5 use 5 other modules.
    So I need 2 things:
    1) those 3 modules preloaded (loaded into memory) and then used - this is not a problem. In the change handler of the button bar I just set the url of the moduleLoader=""; and right after that line I put moduleLoader.url = "module1.swf" for example. This way the ready event fires everytime I change the selected button of the buttonBar and since the module is loaded into memory it changes immediately, which is great.
    2) I need the rest 5 modules that are not preloaded, to be loaded by the moduleLoader and when the user clicks on another button, the module to be unloaded and the new module for the new selected button to be loaded on it's place. So here unloading of the old module and loading of the new one should happen with 1 user interaction - clicking a button. How do I do that?
    I am asking this because I found out that there is some difference when the module has been preloaded or not which changes the way it unloads. Also in certain cases if a module has been unloaded once and loaded again it stops shooting the unload event by only changing the moduleLoader.url and then you have to specifically call moduleLoader.unloadModule() function to get it called.
    And all of this brought me to the idea that maybe the only way to make this work for case 2 is having moduleLoader.unloadModule(); and on the next line after it moduleLoader.url = "newModuleUrlHere";
    But then I bumped into a problem with flickering in my buttonBar selected button transition which I describe and give online example of here:
    http://forums.adobe.com/thread/760347?tstart=0
    So is there any technique of combining preloaded modules which should not be unloaded + the ones who need to be loaded and unloaded and all of this to be working with just one moduleLoader instance?
    I really didn't expect to have so much trouble with modules... If no one can suggest me a working example I will post each case I described here to help me get resolution to this cause I can't get on with my project and it's very important.
    Thanks in advance!

    Hi thanks for the reply here too
    I agree it totally makes sense if I do not unload modules to load them in the same application domain and not as a child. This way I wouldn't have to worry about the singletons I could have forgotten to initialize in the main application If my logic is correct. But still is it wrong to leave them in a child ApplicationDomain since I will still have modules I will need to unload and I would still have to be careful about the singleton managers?
    Note: have in mind I am trying to separate the module's from the main application, so the application won't use any classes defined in the modules since it won't be aware of what's in what module.
    Yes, I do have a buttonBar buttons which map to module urls.
    Ok I will try to setup my questions in a few very simple example applications, it would be easier for you to understand what's confusing me.
    http://filip.nedyalkov.net/moduleLoaderTesting2/ - view source enabled - look at testing3.mxml
    In the button bar change handler I have:
    moduleURL = buttonBar.
    selectedItem.url;moduleLoader.url = moduleURL;
    and I listen to the moduleLoader unload event.
    On the Unload Current Module Button I have: moduleLoader.unloadModule();
    Ok what is confusing me is this: When I start switching between module1 and module2 do they automatically get unloaded because I recall reading that changing the moduleLoader.url property doesn't unload the module just releases it? Also I'm getting the unload event shoot very strange because if I am on module1 and then click on module2 it doesn't shoot that module1 was unloaded, it doesn't do anything. As soon as I click back on module1 then it shoot unloaded (you can see that in my example in the text area).
    Another strange thing is that while doing this, everytime you click on module1 or module2 they get transferred over the network I can see that in mozilla firebug. Now if I am on module1 and click the Unload Current Module button the module really gets unloaded and then the unload event is correct and shoot when it's supposed to shoot. Now if you click on module2 and then come back to module1 it will get loaded again, but now it will be put in memory, it won't shoot unload event any more and it won't get transferred over the network when I switch the modules? Why is that ? All I did was unloading the module once and it changes everything.
    So I hope you undertstand this cause I have no idea is this supposed to work this way? Would you be so kind to explain me this behaviour ?
    Thanks!

  • Folder filter on URL property

    On Portal 4.5WS, I'm crawling a site of news archives and I want to sort them into subfolders by year. The target site is laid out in folders by date, so the URL contains the month and year in the path similar to .../122004/file.htm. I have created subfolders for each year, and created a filter with one criteria, where URL contains 2004, leaving the Text Contains field empty. None of the cards are passing the filter, so they are all ending up in the parent folder. As a test, I changed the filtered property from URL to Name and changed the criteria from 2004 to a word in the Name of an existing card, and the sort worked fine.
    Is there something special about using the URL property in a filter? Is there a trick to specify a partial URL as a filter value? What am I missing here?

    Hi Marcel,
      I know what you meant, the time from %time_set% is being compared with the times from %year%.jan till %year%.dec on an alphabetical order.
      i was wondering if you have any solution to this?
      i have been playing around with different combination, and they all don't work, i.e.
    *when time
    *is < %time_set%.timeid    -> compares alphabetically OR
    *when time.timeid
    *is < %time_set%.timeid    -> grabs timeid from time, and only the year from %time_set% OR
    *when time.timeid
    *is < %time_set%    ->grabs timeid from time, and only the year from %time_set%  OR
    *when time
    *is < %time_set%    -> compares alphabetically.
      anyone has any suggestions on this matter?
    cheers

  • Changing modules with url property of moduleLoader causes buttonBarButtons transition to flicker?

    http://filip.nedyalkov.net/moduleLoaderTesting1/ - source code view enabled - the mxml file is testing2
    So as topic says, I am using moduleLoader to load 2 different modules with the use of buttonBar which has custom skin for the mid button which I use for all 3 buttons in it. In that skin there is a transition defined for up, over and selected states, which is fairly simple.
    In order for the problem to be seen, I use another default buttonBar under it. Clicking on it's buttons will change the selectedIndex of the custom button bar so he has the same selected button as the bottom buttonBar.
    So if you click on "no module" you will see that the transition is fluent, the icon goes a little darker and it's fine. But if you click to load module1 or module2, there is flickering with the icons that get in the selected state which kinda matches when the new module child pops up.
    So my question is simple - how do I fix this?
    Any suggestions are welcome. Feel free to download the code and test yourself.

    Hi, thanks for the reply.
    If you checked my example source code you would see that both of my modules are alike just the rectangle fill has different color:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
                width="100%" height="100%">
        <s:Group width="100%" height="100%">
            <s:Rect width="100%" height="100%">
                <s:fill>
                    <s:SolidColor color="0x000000" />
                </s:fill>
            </s:Rect>
        </s:Group>
    </mx:Module>
    How more lightweight the modules can be...
    I did some more testing and there is no flickering when the module is unloaded only when loaded. And also if I set a timer to load the module after the transition is over there's no flickering. Also there is no flickering for texts and also there is less but still sometimes flickering if the transition target is not rect but group. And also if I set the transition to be not 200 ms as in my example but 1000 ms or more then there is no flickering again which doesn't make any sense to be, cause the flickering in a slower animation should be way more obvious that in a very fast one but it is in the countrary.. no flickering at all. Any ideas ?
    So to fix the problem I have 2 options:
    1) setting at least 1000 ms transition where I don't have flickering
    2) use a timer for shorter transitions and load the module after it's ended
    But this "hacking" doesn't seem very appealing to me so that's why I am asking here if this is a bug or what ?
    Message was edited by: FM_Flame

  • Errors when using Spark Buttons in dynamically loaded modules loaded by dynamically loaded modules

    Ok ... I have to admit this issue is rather special ;-)
    I have a flex application that loads a list of modules after the user logs in, depending on the permissions of the user.
    One of these modules contains a component, that allows the user to configure settings for different types of objects.
    For each object type (can be extended) there exists one module swf.
    The strange problem I am having now is that as soon as a Spark Button (or anything derived from one ... CheckBox) inside the settings-module. I get the following error (unfortunately in german ... but I'll try to translate).
    This error happens when using a spark CheckBox (Which is derived from Spark Button):
    ArgumentError: Error #2004: Einer der Parameter ist ungültig.
    at flash.display::Graphics/drawRect()
    at mx.graphics::RectangularDropShadow/drawShadow()[E:\dev\4.x\frameworks\projects\framework\ src\mx\graphics\RectangularDropShadow.as:575]
    at mx.skins.spark::BorderSkin/updateDisplayList()[E:\dev\4.x\frameworks\projects\sparkskins\ src\mx\skins\spark\BorderSkin.mxml:174]
    at mx.core::UIComponent/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\m x\core\UIComponent.as:8709]
    at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework \src\mx\managers\LayoutManager.as:663]
    at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:718]
    at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1072]
    When having a look at the problem the cause is that width and height are not set (NaN).
    If I use a plain Button I get the same error in "drawRoundRect".
    As soon as I change back to a mx-Button/Checkbox, everything is fine.
    In my current Case I wanted to use a custom TreeItemRenderer to display a CheckBox in the tree. This tree Item renderer is included in a custom Lib that is used by all modules.
    I have one Second Level module using this renderer. I have one Third Level Module thas uses the exact same tree definition. If I use the MX CheckBox I get CheckBoxes in the Second- and Third-Level Module. If I use the Spark-CheckBox I get a CheckBox in my Second Level Module and the above Error in the Third Level Module.
    To make everything even stranger: I have a custom component loading my modules and I use this in the Top Level Module to load the Second Level Modules and in my Second Level Module to load my Third Level Modules (So I would guess If my loader is broken, then the Second Level Modules should not work either).
    Help is greatly appreciated :-)
    Regards,
          Chris

    Ok, I managed to find out what was going wrong and to get my stuff working again. I have to admit that I have no idea why my application / flex was showing this behaviour. The only way I could track this down was by undoing the Subversion checkins one by one. Finding out what was happening using common sense seems to be out of the question with this issue.
    My application is built up of a main application swf that loads module swfs and a library swc that contains common stuff and is used in the main application and the modules.
    I now had some custom TreeItemRenderers in my modules. The problem was caused by moving a custom TreeItemRenderer from one module to the library-swc. I could successfully reproduce this. If I add only one class extending TreeItemRenderer to my library (I don't even have to use it), the entire flex system goes haywire. As soon as I remove that class, everything is ok. I checked, if there might be a problem with third party libs containing flex core classes which might be used instead of the sdk ones, but after looking at the catalogs of the third party swcs I couldn't find a reference to TreeItemRenderer.
    Any Ideas? I sort of dislike the idea of being able to run into such strange problems. Is there a tool that allows me to check for class compatibility issues?

  • [svn:fx-trunk] 9320: Fix Application.url property when RSLs are used.

    Revision: 9320
    Author:   [email protected]
    Date:     2009-08-14 14:49:12 -0700 (Fri, 14 Aug 2009)
    Log Message:
    Fix Application.url property when RSLs are used.
    Use LoaderUtil.normalizeURL() to normalize the Application.url property. Do the same thing for both the Halo and Spark versions of Application.
    QE notes: None.
    Doc notes: None.
    Bugs: SDK-22154
    Reviewer: Alex
    Tests run: checkintests
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22154
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as

  • Loading modules when using enter-pssession

    Hello
    I see some thing that appears unusual to me.
    Server1 is running PowerShell v2
    Client1 is running PowerShell v2
    If I am logged directly to Server1 and do
    $Host
    $PSVersionTable
    I get the result I would expect e.g. version 2 and PSVersion2. I can also load Modules in the normal way directly from Server1 e.g. Import-Module ...
    From Client1 (or any other client) if I Enter-PSSession Server1 then
    $Host
    $PSVersionTable
    I get the following verion 1 and PSVersion 2
    So basically even though the PSVersion is 2 the Host (e.g. PS-Session Host) is version 1, and therefore I cannot load Modules as I get the following error if I try
    Import-Module : The current PowerShell host is: 'ServerRemoteHost' (version 1.0.0.0). The module
    'C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\pspki\pspki.psd1' requires a minimum PowerShell ho
    st version of '2.0' to execute.
    So it occurs to me the "Host" execution environment you get with PS-Session is a cut down version e.g. version 1
    Is this normal? is there a work around for it?
    Thanks All
    AAnotherUser__
    AAnotherUser__

    What is a client system? YOu say "client1" which is some PC that is not a "server class" PC is running PowerShell V2.  What does that mean.
    At any V2 system prompt this is what V2 displays:
    PS C:\scripts> $host
    Name : ConsoleHost
    Version : 2.0
    InstanceId : 5bfce22c-8b10-4c67-8dd7-435ff1c351a7
    UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
    CurrentCulture : en-US
    CurrentUICulture : en-US
    PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
    IsRunspacePushed : False
    Runspace : System.Management.Automation.Runspaces.LocalRunspace
    PS C:\scripts> $psversiontable
    Name Value
    CLRVersion 2.0.50727.3655
    BuildVersion 6.0.6002.18111
    PSVersion 2.0
    WSManStackVersion 2.0
    PSCompatibleVersions {1.0, 2.0}
    SerializationVersion 1.1.0.1
    PSRemotingProtocolVersion 2.1
    Host will report Version 2.0  if it doesn;t you are not running V2 you are running V1.
    ¯\_(ツ)_/¯

  • How to unload dynamically loaded modules?

    Hi,
    I have a problem with unloading module, which I loads dynamically.
    Here is a fragment my code:
    <TitledWindow .......creationComplete="init()"/>
    <mx:Accordion id="lista_ryzyk">
    </mx:Accordion>
    <mx:Script>
    public function init():void
    {    CairngormEventDispatcher.getInstance().addEventListener(LoadRisksEvent.EVENT_RESULT, populateAccordion);
    public function populateAccordion(event:CairngormEvent):void
         lista_ryzyk.removeAllChildern();
         for (i in risks)
              var m:ModuleLoader = new ModuleLoader();
              m.url = path_to_module;
              m.label = module_label;
              m.loadModule();
         lista_ryzyk.addChildAt(m,Number(i));
    </mx:Script>
    The modules loads fine. Each module adds own eventListener for some event. It works fine, but ONLY for first time. For next invoke populateAccordion function, the modules loads, but don't reacts for event. I investigate !!! that for events reacts that modules, which was loaded for the first time!!! How to remove it????

    Using array, didn't solve my problem, but it is possible that I'm doing something wrong.
    I still can't catch event in second time loaded module :-((( I have tried to solve this problem from wednesday! it goes me crazy!
    Could you, or anybody, try to inspect my code and help me? I have no idea how to manage it.
    I know exactly what is wrong, but I can't improve that. In module's creationComplete function I display the UID of this module, and in body of eventHandler function I do the same. In case of FIRST time  the displayed UID are the same, but when I load the module second time, the UID of the loaded module displayed in creationComplete function is new, but the UID displayed in handler function is the same as the first loaded module. So my event is catch by the wrong modul, and I don'tknow how to change it, how to process event in my newly loaded module.

  • How to load modules in application but to call them at appropriate time

    hi i want
    to call module 2 on click event of a button on module 1
    what ia m trying to do is i am preloading the modules using <mx:ModuleLoader 
    url="mod1.swf" id="m1"/>
    <mx:ModuleLoader url="mod2.swf" id="m2"/>
    but this was laoding all the modules one after another in the main application
    but then i tried finding sloution in
    <mx:ViewStack  id="tops" width="100%" height="100%">  
    <mx:ModuleLoader id="test" url="mod1.swf" width="100%" height="100%"/>  
    <mx:ModuleLoader id="modPrint" url= "mod2.swf" width="100%" height="100%"/></mx:ViewStack> 
    this was serving my purpose of loading the modules and hiding them till i call them
    Can some body suggest some better way of doing it ......... please dont tell me preloading ....coz i want to preload more then 20 modules

    What database?
    db

  • ModuleViewLoader - does it load modules into child application domains by default ?

    Is the Cairngorm 3, "ModuleViewLoader" loading modules into child application domains by default, or we have to do it our self like this:
    public function init():void{
         var childDomain:ApplicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
      modelLoader.applicationDomain = childDomain;
    <module:ModuleViewLoader id="moduleLoader"
                      moduleId="{ moduleId }"
                      moduleManager="{ moduleManager }"
                      skinClass="com.adobe.cairngorm.module.ModuleViewLoaderSkin"
                      visible="{this.visible}"
                      width="100%" height="100%">
         <module:loadPolicy>
              <module:BasicLoadPolicy/>
         </module:loadPolicy>
    </module:ModuleViewLoader>
    I think it's important to know regarding unloading the modules.
    Thanks,

    Hi Adrian,
    We are following the behaviour of the Flex ModuleManager:
    We use the applicationDomain provided by the user when available
    Otherwise we create a sub applicationDomain from the current domain.
    Here is an extract of the ParsleyModuleInfoProxy
    private function createDefaultApplicationDomain(applicationDomain:ApplicationDomain):ApplicationDomain
                // If an applicationDomain has not been specified and we have a module factory,
                // then create a child application domain from the application domain
                // this module factory is in.
                // This is a change in behavior so only do it for Flex 4 and newer
                // applications.
                var tempApplicationDomain:ApplicationDomain = applicationDomain;
                if (tempApplicationDomain == null && moduleFactory)
                    var currentDomain:ApplicationDomain = moduleFactory.info()["currentDomain"];
                    tempApplicationDomain = new ApplicationDomain(currentDomain);
                return tempApplicationDomain;
    We will update the documentation to highlight the fact that a sub ApplicationDomain is created by default.
    Thanks.

  • Httpservice url property problem

    hello everyone
    I need to include non latin characters in my httpservice url property. It points to a file. (http://www.myurl.com/nonLatinCharactersInFilename.xml)And its giving me errors.
    When I check the error, the url appears like so: http://www.myurl.com/??????????????????.xml
    Im using these character set everywhere in the code and there are no problems except when im sending the httpservice call.
    I also have same characters in the result event. and theres no prpblem with that.
    Any ideas how I can include these file names in the url property? or is there another way?
    In my app the user clicks a list (of file names with non latin characters) and an http service is sent to load the corresponding file to a richEditableText component.
    every thing except the non latin character part works fine
    any help in the right direction will be appreciated.
    thanx

    Hello,
    I am not shure, but I think you have to use a webserver, with
    a folder directing to your desktop. Then you can use something like
    that:
    http://localhost/Desktop.
    Otherwise you can try file:///C://Documents and
    Settings/[username]/Desktop/flex/...xml
    I hope this will help

  • Loading modules from different domain

    when I load modules from the same location where is main application, everything is fine. But when modules are loaded from different adrress i got following error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at mx.utils::LoaderUtil$/isRSLLoaded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\uti ls\LoaderUtil.as:525]
              at mx.utils::LoaderUtil$/http://www.adobe.com/2006/flex/mx/internal::processRequiredRSLs()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\utils\LoaderUtil.as:259]
              at mx.core::FlexModuleFactory/getRSLInfo()[E:\dev\4.5.1\frameworks\projects\framework\src\mx \core\FlexModuleFactory.as:582]
              at mx.core::FlexModuleFactory/update()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\cor e\FlexModuleFactory.as:470]
              at mx.core::FlexModuleFactory/moduleInitHandler()[E:\dev\4.5.1\frameworks\projects\framework \src\mx\core\FlexModuleFactory.as:819]
    any ideas what might be wrong?
    thanks for any help in advance

    This is a link to testing application:
    http://michalnpe.homeip.net:55001/bin-release/LoadModuleApp.html
    you can see source code of this app.
    Let's say we want to run module from different domain.
    so insert following address for crossdomain.xml and module (into TextInput in the applicataion above) .
    http://a2s.pl/crossdomain.xml
    http://www.a2s.pl/npe/softmgr/Michal/wymiana/TestModule.swf
    here is the code that loads the module:
    protected function loadModule(event:MouseEvent):void
                                            testloader.url = moduleAddress.text;
                                            //testloader.loadModule();
                                  public function setup():void { // run before loading modules
                                            Security.allowDomain("*");
                                            Security.loadPolicyFile(crossdomain.text);
                                            var request:URLRequest = new URLRequest(crossdomain.text);
                                            var loader:URLLoader = new URLLoader();
                                            loader.load(request);

  • Problem with modules and ModuleLoader

    Hi everybody,
    i'm facing a real funny problem with modules and
    moduleLoader, i hope
    it's not (only) my fault anyway...
    If i create a normal flex project with fBuilder, i'm able to
    use
    modules in a lot of different ways (as mxml, as as in a
    function etc..)...
    but if i try to use them in my fds application (created with
    fds
    eclipse plugin or as a dataServices project) i can't use
    modules. The compile-time error message is
    always the same:
    Could not resolve <mx:ModuleLoader> to a component
    implementation
    I tried a lot of solutions, paying attention to import all
    the classes, to declaration, naming, positioning
    etc...but nothing changes, this thing is drivining me
    crazy!!!.
    I will appreciate anykind of help.
    TIA
    Fabio

    Any idea?

  • Loading assemblies using Reflection when dependant dlls are missing.

    Hello All,
    I've created a sample WinForms application where I upload a dll (present in my local machine).
    I just need to read the public types (classes) defined in the assembly. So I've used the ExportedTypes property.
    When the dependant dlls are present in my machine, I'm able to read the public types of the assembly using the ExportedTypes property.But when the dependant dlls are not available in my machine, I get the following error:
    "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."
    Please let me know how to overcome this problem even when the dependant dlls are missing.
    NOTE: When the same dll, is looked upon using  ILDASM.exe we are able to view its classes, even when the dependant dlls are not present.
    Thanks, Satish Bommideni "Success usually comes to those who are too busy to be looking for it."

    Hi Darin,
    Thanks again.!!
    I'm having trouble reading a COM dll.
    I'm using following code  and using the LoadTypeLib method to fetch the dlls ITypeLib.
    [DllImport("oleaut32.dll", CharSet = CharSet.Unicode, PreserveSig = false)]
            static extern ITypeLib LoadTypeLib(string szFile);
    I'm able to get the classes/ProgIds. But I need to fetch only those classes which implement a particular interface. I tried using the following code to fetch the implemented interface, but its not successful for the case where multiple classes implementing
    that interface
    var typeLibrary = LoadTypeLib(openFileDialog1.FileName);
    int typeCount = typeLibrary.GetTypeInfoCount();
    for (int i = 0; i < typeCount; i++)
    System.Runtime.InteropServices.ComTypes.TYPEKIND TKind;
    System.Runtime.InteropServices.ComTypes.IMPLTYPEFLAGS implInterface;
    typeLibrary.GetTypeInfoType(i, out TKind);
    if (TKind == System.Runtime.InteropServices.ComTypes.TYPEKIND.TKIND_COCLASS)
    Type objType = typeLibrary.GetType();
    Type objInterface = objType.GetInterface("IMyInterface", true);
    try
     obj.GetImplTypeFlags(i, out Interfa);
    Thanks, Satish Bommideni "Success usually comes to those who are too busy to be looking for it."

Maybe you are looking for

  • How to differentiate a Goods receipt ?

    hello gurus how to differentiate the Goods receipts which are done only against an Inbound Deliveries  from that of direct POs. Is there any table to check the same ? Thanks in advance

  • How To save a music file from an email

    PLEASE HELP ME I CANT FIGURE OUT HOW TO SAVE SONG FROM MY ITUNES LIBRARY THAT U SENT TO MY EMAIL Post relates to: Pixi Plus p8wu0 (AT&T)

  • How is it possible to get list of VIs from executable?

    Hi! Simple question. I have executable (builded with LabVIEW, of course). In LabVIEW 8.0.1 - based application I able to get list of VI inside of executable (with ..\LabVIEW 8.x\vi.lib\Utility\libraryn.llb\Get VI Library.vi) But if application was bu

  • [BOEXI3] Interactive editor sample

    Hi. I have the need to embed the interactive viewer (and / or the java applet) in a custom application. To achiev that, I downloaded the interactive editor sample and tried to get the necessary information out of it. What I can do now, is - select a

  • Unclear if Illustrator or InDesign should be used - advice needed

    Hi, I've been using Illustrator for 10+ years to design my companies brochures, logos, business cards, forms, advertisements, instruction manuals, etc.  LOTS of stuff.  Lately it's been bothering me that I have so much duplicated content spread acros