OSDN Git Service

Cosmetic changes to GetFunctionsFromScript, to document
authorPerry Rapp <elsapo@users.sourceforge.net>
Sun, 23 Oct 2005 20:21:18 +0000 (20:21 +0000)
committerPerry Rapp <elsapo@users.sourceforge.net>
Sun, 23 Oct 2005 20:21:18 +0000 (20:21 +0000)
  arguments passed to GetTypeInfo.
 Src: Plugins.cpp

Src/Changes.txt
Src/Plugins.cpp

index a8ad338..9d9c578 100644 (file)
@@ -2,6 +2,9 @@
  PATCH: [ 1334484 ] Skip location view paint if buffer not initialized
   Src: LocationView.cpp MergeDoc.cpp MergeDoc.h
    MergeEditView.cpp MergeEditView.h
+ Cosmetic changes to GetFunctionsFromScript, to document 
+  arguments passed to GetTypeInfo.
+ Src: Plugins.cpp
 
 2005-10-21 Kimmo
  PATCH: [ 1333545 ] Small improvement to Open-dialog folder selection
index d9a3abb..5bada2b 100644 (file)
@@ -96,10 +96,12 @@ int GetFunctionsFromScript(LPDISPATCH piDispatch, BSTR *& namesArray, int *& IdA
        UINT iValidFunc = 0;
        if (piDispatch)
        {
-               ITypeInfo *piTypeInfo;
-               if SUCCEEDED(hr = piDispatch->GetTypeInfo(0, 0, &piTypeInfo))
+               ITypeInfo *piTypeInfo=0;
+               unsigned int  iTInfo = 0; // 0 for type information of IDispatch itself
+               LCID  lcid=0; // locale for localized method names (ignore if no localized names)
+               if SUCCEEDED(hr = piDispatch->GetTypeInfo(iTInfo, lcid, &piTypeInfo))
                {
-                       TYPEATTR *pTypeAttr;
+                       TYPEATTR *pTypeAttr=0;
                        if SUCCEEDED(hr = piTypeInfo->GetTypeAttr(&pTypeAttr))
                        {
                                // allocate arrays for the returned structures