Sign in to follow this  
Followers 0
robd

Can't call function in COM object

5 posts in this topic

First of all I'd like to say hello to community and thanks for such great thing as AutoIT :)

I'm creating p2p application and using GnuDNA library for p2p communication and etc.

There is one function: SetSharedDirs(String Arrary* DirPaths) which I should to call to share my folder

Dim $shared[1] = [@ScriptDir & "\Shared"]
$oDnaCore = ObjCreate("GnucDNA.Core")   
$oDnaShare = $oDnaCore.getIShare
$oDnaShare.SetSharedDirs($share)

but always getting this error from error handler:

We intercepted a COM Error!

Number is: 80020005

Windescription: Type mismatch

also I dig source code of this library and found current funtion:

607 void CComShare::SetSharedDirs(VARIANT* pDirPaths)
  608 {
  609   AFX_MANAGE_STATE(AfxGetStaticModuleState());
  610 
  611   if((pDirPaths->vt & VT_ARRAY) == 0)
  ...

How to solve this problem?

Will be very appreciate for help, thanks

Share this post


Link to post
Share on other sites



Somebody should know this. I'm trying two days long, but can find solution... :)

Please, I need help.

Share this post


Link to post
Share on other sites

Hi again, seems I'm not only one with such problems... not deep search gave me 3 more topics like mine:

http://www.autoitscript.com/forum/index.php?showtopic=34686

http://www.autoitscript.com/forum/index.php?showtopic=47123

http://www.autoitscript.com/forum/index.ph...mode=linearplus

so, maybe it's time to define this problem as bug and fix it ?

Yes, because clearly things that don't work how you expect are bugs unconditionally. It couldn't be that it's just not supported, could it?

Share this post


Link to post
Share on other sites

@robd - You obviously know that Type Mismatch is a very generic error... right?

Suggest you Google GnucDNA SetSharedDirs Type mismatch

Your issue is not unique to AutoIt:

http://www.planet-source-code.com/URLSEO/v...rue/Posting.htm

Suggest you try to get a working example on VBScript first and then you may be able to convert it to AutoIt.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0