reorganized the samples, again. Moved the programs that were more test cases to the unit test directory and repackaged the unit test directory.

This commit is contained in:
clay_shooter
2006-03-18 16:21:28 +00:00
parent 288b2da21a
commit 4eb49215cb
61 changed files with 767 additions and 711 deletions

View File

@@ -0,0 +1 @@
This package exists in case folks need to test the Jacob COM objects and need access to protected methods

View File

@@ -0,0 +1,37 @@
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "Math"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
'To fire this event, use RaiseEvent with the following syntax:
'RaiseEvent DoneAdd[(arg1, arg2, ... , argn)]
Public Event DoneAdd(result As Variant)
'To fire this event, use RaiseEvent with the following syntax:
'RaiseEvent DoneMult[(arg1, arg2, ... , argn)]
Public Event DoneMult(result As Variant)
Public Function Mult(in1 As Variant, in2 As Variant) As Variant
Mult = in1 * in2
RaiseEvent DoneMult(in1 * in2)
End Function
Public Function Add(in1 As Variant, in2 As Variant) As Variant
Add = in1 + in2
RaiseEvent DoneAdd(in1 + in2)
End Function
Public Function getNothing() As Variant
Set getNothing = Nothing
End Function

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,55 @@
package com.jacob.test.MathProj;
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.*;
/**
* This example uses the MathTest sample VB COM DLL under
* the MathProj directory
* <pre>
* -Djava.library.path=d:/jacob/release -Dcom.jacob.autogc=false -Dcom.jacob.debug=true
* </pre>
*/
class MathTest {
public static void main(String[] args) {
MathTest me = new MathTest();
me.runTest();
}
public MathTest(){
}
public void runTest(){
// deprecated
// System.runFinalizersOnExit(true);
Dispatch test = new ActiveXComponent("MathTest.Math");
TestEvents te = new TestEvents();
DispatchEvents de = new DispatchEvents(test, te);
if (de == null) {
System.out
.println("null returned when trying to create DispatchEvents");
}
System.out.println(Dispatch.call(test, "Add", new Variant(1),
new Variant(2)));
System.out.println(Dispatch.call(test, "Mult", new Variant(2),
new Variant(2)));
Variant v = Dispatch.call(test, "Mult", new Variant(2), new Variant(2));
// this should return false
System.out.println("v.isNull=" + v.isNull());
v = Dispatch.call(test, "getNothing");
// these should return nothing
System.out.println("v.isNull=" + v.isNull());
System.out.println("v.toDispatch=" + v.toDispatch());
}
public class TestEvents {
public void DoneAdd(Variant[] args) {
System.out.println("DoneAdd called in java");
}
public void DoneMult(Variant[] args) {
System.out.println("DoneMult called in java");
}
}
}

Binary file not shown.

View File

@@ -0,0 +1,35 @@
Type=OleDll
Class=Math; Math.cls
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\StdOle2.Tlb#OLE Automation
Startup="(None)"
HelpFile=""
Title="MathTest"
ExeName32="MathTest.dll"
Command32=""
Name="MathTest"
HelpContextID="0"
CompatibleMode="1"
CompatibleEXE32="MathTest.dll"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="Inventure America, Inc."
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=1
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1
ThreadingModel=1
DebugStartupOption=0

View File

@@ -0,0 +1 @@
Math = 75, 13, 656, 554,

View File

@@ -0,0 +1,5 @@
A Simple VB COM DLL that exposes two methods and raises events.
The dll must be registered with your system
Run --> regsvr32 <path>\com\jacob\test\MathProj\MathTest.dll

View File

@@ -0,0 +1,67 @@
// Face.cpp : Implementation of CMultiFaceApp and DLL registration.
#include "stdafx.h"
#include "MultiFace.h"
#include "Face.h"
/////////////////////////////////////////////////////////////////////////////
//
STDMETHODIMP Face::InterfaceSupportsErrorInfo(REFIID riid)
{
static const IID* arr[] =
{
&IID_IFace1,
&IID_IFace2,
&IID_IFace3,
};
for (int i=0;i<sizeof(arr)/sizeof(arr[0]);i++)
{
if (InlineIsEqualGUID(*arr[i],riid))
return S_OK;
}
return S_FALSE;
}
STDMETHODIMP Face::get_Face1Name(BSTR *pVal)
{
// TODO: Add your implementation code here
*pVal = name1;
return S_OK;
}
STDMETHODIMP Face::put_Face1Name(BSTR newVal)
{
// TODO: Add your implementation code here
name1 = newVal;
return S_OK;
}
STDMETHODIMP Face::get_Face2Nam(BSTR *pVal)
{
// TODO: Add your implementation code here
*pVal = name2;
return S_OK;
}
STDMETHODIMP Face::put_Face2Nam(BSTR newVal)
{
// TODO: Add your implementation code here
name2 = newVal;
return S_OK;
}
STDMETHODIMP Face::get_Face3Name(BSTR *pVal)
{
// TODO: Add your implementation code here
*pVal = name3;
return S_OK;
}
STDMETHODIMP Face::put_Face3Name(BSTR newVal)
{
// TODO: Add your implementation code here
name3 = newVal;
return S_OK;
}

View File

@@ -0,0 +1,63 @@
// Face.h: Definition of the Face class
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_FACE_H__9BF24413_B2E0_11D4_A695_00104BFF3241__INCLUDED_)
#define AFX_FACE_H__9BF24413_B2E0_11D4_A695_00104BFF3241__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// Face
class Face :
public IDispatchImpl<IFace1, &IID_IFace1, &LIBID_MULTIFACELib>,
public IDispatchImpl<IFace2, &IID_IFace2, &LIBID_MULTIFACELib>,
public IDispatchImpl<IFace3, &IID_IFace3, &LIBID_MULTIFACELib>,
public ISupportErrorInfo,
public CComObjectRoot,
public CComCoClass<Face,&CLSID_Face>
{
// IFace1
private:
CComBSTR name1;
// IFace2
CComBSTR name2;
// IFace3
CComBSTR name3;
public:
Face() {}
BEGIN_COM_MAP(Face)
COM_INTERFACE_ENTRY2(IDispatch, IFace1)
COM_INTERFACE_ENTRY(IFace1)
COM_INTERFACE_ENTRY(IFace2)
COM_INTERFACE_ENTRY(IFace3)
COM_INTERFACE_ENTRY(ISupportErrorInfo)
END_COM_MAP()
//DECLARE_NOT_AGGREGATABLE(Face)
// Remove the comment from the line above if you don't want your object to
// support aggregation.
DECLARE_REGISTRY_RESOURCEID(IDR_Face)
// ISupportsErrorInfo
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
public:
STDMETHOD(get_Face3Name)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(put_Face3Name)(/*[in]*/ BSTR newVal);
STDMETHOD(get_Face2Nam)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(put_Face2Nam)(/*[in]*/ BSTR newVal);
STDMETHOD(get_Face1Name)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(put_Face1Name)(/*[in]*/ BSTR newVal);
};
#endif // !defined(AFX_FACE_H__9BF24413_B2E0_11D4_A695_00104BFF3241__INCLUDED_)

View File

@@ -0,0 +1,23 @@
HKCR
{
MultiFace.Face.1 = s 'Face Class'
{
CLSID = s '{9BF24412-B2E0-11D4-A695-00104BFF3241}'
}
MultiFace.Face = s 'Face Class'
{
CLSID = s '{9BF24412-B2E0-11D4-A695-00104BFF3241}'
}
NoRemove CLSID
{
ForceRemove {9BF24412-B2E0-11D4-A695-00104BFF3241} = s 'Face Class'
{
ProgID = s 'MultiFace.Face.1'
VersionIndependentProgID = s 'MultiFace.Face'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'both'
}
}
}
}

Binary file not shown.

View File

@@ -0,0 +1,72 @@
// MultiFace.cpp : Implementation of DLL Exports.
// Note: Proxy/Stub Information
// To build a separate proxy/stub DLL,
// run nmake -f MultiFaceps.mk in the project directory.
#include "stdafx.h"
#include "resource.h"
#include <initguid.h>
#include "MultiFace.h"
#include "MultiFace_i.c"
#include "Face.h"
CComModule _Module;
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_Face, Face)
END_OBJECT_MAP()
/////////////////////////////////////////////////////////////////////////////
// DLL Entry Point
extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
_Module.Init(ObjectMap, hInstance, &LIBID_MULTIFACELib);
DisableThreadLibraryCalls(hInstance);
}
else if (dwReason == DLL_PROCESS_DETACH)
_Module.Term();
return TRUE; // ok
}
/////////////////////////////////////////////////////////////////////////////
// Used to determine whether the DLL can be unloaded by OLE
STDAPI DllCanUnloadNow(void)
{
return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
}
/////////////////////////////////////////////////////////////////////////////
// Returns a class factory to create an object of the requested type
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
return _Module.GetClassObject(rclsid, riid, ppv);
}
/////////////////////////////////////////////////////////////////////////////
// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer(void)
{
// registers object, typelib and all interfaces in typelib
return _Module.RegisterServer(TRUE);
}
/////////////////////////////////////////////////////////////////////////////
// DllUnregisterServer - Removes entries from the system registry
STDAPI DllUnregisterServer(void)
{
return _Module.UnregisterServer(TRUE);
}

View File

@@ -0,0 +1,9 @@
; MultiFace.def : Declares the module parameters.
LIBRARY "MultiFace.DLL"
EXPORTS
DllCanUnloadNow @1 PRIVATE
DllGetClassObject @2 PRIVATE
DllRegisterServer @3 PRIVATE
DllUnregisterServer @4 PRIVATE

View File

@@ -0,0 +1,323 @@
# Microsoft Developer Studio Project File - Name="MultiFace" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=MultiFace - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "MultiFace.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "MultiFace.mak" CFG="MultiFace - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "MultiFace - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "MultiFace - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "MultiFace - Win32 Release MinSize" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "MultiFace - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "MultiFace - Win32 Unicode Release MinSize" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "MultiFace - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "MultiFace - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# Begin Custom Build - Performing registration
OutDir=.\Debug
TargetPath=.\Debug\MultiFace.dll
InputPath=.\Debug\MultiFace.dll
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
# End Custom Build
!ELSEIF "$(CFG)" == "MultiFace - Win32 Unicode Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "DebugU"
# PROP BASE Intermediate_Dir "DebugU"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "DebugU"
# PROP Intermediate_Dir "DebugU"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# Begin Custom Build - Performing registration
OutDir=.\DebugU
TargetPath=.\DebugU\MultiFace.dll
InputPath=.\DebugU\MultiFace.dll
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
# End Custom Build
!ELSEIF "$(CFG)" == "MultiFace - Win32 Release MinSize"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseMinSize"
# PROP BASE Intermediate_Dir "ReleaseMinSize"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseMinSize"
# PROP Intermediate_Dir "ReleaseMinSize"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# Begin Custom Build - Performing registration
OutDir=.\ReleaseMinSize
TargetPath=.\ReleaseMinSize\MultiFace.dll
InputPath=.\ReleaseMinSize\MultiFace.dll
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
# End Custom Build
!ELSEIF "$(CFG)" == "MultiFace - Win32 Release MinDependency"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseMinDependency"
# PROP BASE Intermediate_Dir "ReleaseMinDependency"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseMinDependency"
# PROP Intermediate_Dir "ReleaseMinDependency"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# Begin Custom Build - Performing registration
OutDir=.\ReleaseMinDependency
TargetPath=.\ReleaseMinDependency\MultiFace.dll
InputPath=.\ReleaseMinDependency\MultiFace.dll
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
# End Custom Build
!ELSEIF "$(CFG)" == "MultiFace - Win32 Unicode Release MinSize"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseUMinSize"
# PROP BASE Intermediate_Dir "ReleaseUMinSize"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseUMinSize"
# PROP Intermediate_Dir "ReleaseUMinSize"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# Begin Custom Build - Performing registration
OutDir=.\ReleaseUMinSize
TargetPath=.\ReleaseUMinSize\MultiFace.dll
InputPath=.\ReleaseUMinSize\MultiFace.dll
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
# End Custom Build
!ELSEIF "$(CFG)" == "MultiFace - Win32 Unicode Release MinDependency"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseUMinDependency"
# PROP BASE Intermediate_Dir "ReleaseUMinDependency"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseUMinDependency"
# PROP Intermediate_Dir "ReleaseUMinDependency"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# Begin Custom Build - Performing registration
OutDir=.\ReleaseUMinDependency
TargetPath=.\ReleaseUMinDependency\MultiFace.dll
InputPath=.\ReleaseUMinDependency\MultiFace.dll
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
# End Custom Build
!ENDIF
# Begin Target
# Name "MultiFace - Win32 Debug"
# Name "MultiFace - Win32 Unicode Debug"
# Name "MultiFace - Win32 Release MinSize"
# Name "MultiFace - Win32 Release MinDependency"
# Name "MultiFace - Win32 Unicode Release MinSize"
# Name "MultiFace - Win32 Unicode Release MinDependency"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\Face.cpp
# End Source File
# Begin Source File
SOURCE=.\MultiFace.cpp
# End Source File
# Begin Source File
SOURCE=.\MultiFace.def
# End Source File
# Begin Source File
SOURCE=.\MultiFace.idl
# ADD MTL /tlb ".\MultiFace.tlb" /h "MultiFace.h" /iid "MultiFace_i.c" /Oicf
# End Source File
# Begin Source File
SOURCE=.\MultiFace.rc
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\Face.h
# End Source File
# Begin Source File
SOURCE=.\Resource.h
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\Face.rgs
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "MultiFace"=.\MultiFace.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,571 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 5.01.0164 */
/* at Sun Nov 05 01:12:47 2000
*/
/* Compiler settings for D:\jacob_15\samples\test\atl\MultiFace\MultiFace.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 440
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __MultiFace_h__
#define __MultiFace_h__
#ifdef __cplusplus
extern "C"{
#endif
/* Forward Declarations */
#ifndef __IFace1_FWD_DEFINED__
#define __IFace1_FWD_DEFINED__
typedef interface IFace1 IFace1;
#endif /* __IFace1_FWD_DEFINED__ */
#ifndef __IFace2_FWD_DEFINED__
#define __IFace2_FWD_DEFINED__
typedef interface IFace2 IFace2;
#endif /* __IFace2_FWD_DEFINED__ */
#ifndef __IFace3_FWD_DEFINED__
#define __IFace3_FWD_DEFINED__
typedef interface IFace3 IFace3;
#endif /* __IFace3_FWD_DEFINED__ */
#ifndef __Face_FWD_DEFINED__
#define __Face_FWD_DEFINED__
#ifdef __cplusplus
typedef class Face Face;
#else
typedef struct Face Face;
#endif /* __cplusplus */
#endif /* __Face_FWD_DEFINED__ */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void __RPC_FAR * );
#ifndef __IFace1_INTERFACE_DEFINED__
#define __IFace1_INTERFACE_DEFINED__
/* interface IFace1 */
/* [unique][helpstring][dual][uuid][object] */
EXTERN_C const IID IID_IFace1;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("9BF2440F-B2E0-11D4-A695-00104BFF3241")
IFace1 : public IDispatch
{
public:
virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Face1Name(
/* [retval][out] */ BSTR __RPC_FAR *pVal) = 0;
virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Face1Name(
/* [in] */ BSTR newVal) = 0;
};
#else /* C style interface */
typedef struct IFace1Vtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )(
IFace1 __RPC_FAR * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )(
IFace1 __RPC_FAR * This);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )(
IFace1 __RPC_FAR * This);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )(
IFace1 __RPC_FAR * This,
/* [out] */ UINT __RPC_FAR *pctinfo);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )(
IFace1 __RPC_FAR * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )(
IFace1 __RPC_FAR * This,
/* [in] */ REFIID riid,
/* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
/* [in] */ UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ DISPID __RPC_FAR *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )(
IFace1 __RPC_FAR * This,
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
/* [out] */ VARIANT __RPC_FAR *pVarResult,
/* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
/* [out] */ UINT __RPC_FAR *puArgErr);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Face1Name )(
IFace1 __RPC_FAR * This,
/* [retval][out] */ BSTR __RPC_FAR *pVal);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Face1Name )(
IFace1 __RPC_FAR * This,
/* [in] */ BSTR newVal);
END_INTERFACE
} IFace1Vtbl;
interface IFace1
{
CONST_VTBL struct IFace1Vtbl __RPC_FAR *lpVtbl;
};
#ifdef COBJMACROS
#define IFace1_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IFace1_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IFace1_Release(This) \
(This)->lpVtbl -> Release(This)
#define IFace1_GetTypeInfoCount(This,pctinfo) \
(This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
#define IFace1_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
(This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IFace1_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
(This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IFace1_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
(This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IFace1_get_Face1Name(This,pVal) \
(This)->lpVtbl -> get_Face1Name(This,pVal)
#define IFace1_put_Face1Name(This,newVal) \
(This)->lpVtbl -> put_Face1Name(This,newVal)
#endif /* COBJMACROS */
#endif /* C style interface */
/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IFace1_get_Face1Name_Proxy(
IFace1 __RPC_FAR * This,
/* [retval][out] */ BSTR __RPC_FAR *pVal);
void __RPC_STUB IFace1_get_Face1Name_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IFace1_put_Face1Name_Proxy(
IFace1 __RPC_FAR * This,
/* [in] */ BSTR newVal);
void __RPC_STUB IFace1_put_Face1Name_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IFace1_INTERFACE_DEFINED__ */
#ifndef __IFace2_INTERFACE_DEFINED__
#define __IFace2_INTERFACE_DEFINED__
/* interface IFace2 */
/* [unique][helpstring][dual][uuid][object] */
EXTERN_C const IID IID_IFace2;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("9BF24410-B2E0-11D4-A695-00104BFF3241")
IFace2 : public IDispatch
{
public:
virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Face2Nam(
/* [retval][out] */ BSTR __RPC_FAR *pVal) = 0;
virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Face2Nam(
/* [in] */ BSTR newVal) = 0;
};
#else /* C style interface */
typedef struct IFace2Vtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )(
IFace2 __RPC_FAR * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )(
IFace2 __RPC_FAR * This);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )(
IFace2 __RPC_FAR * This);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )(
IFace2 __RPC_FAR * This,
/* [out] */ UINT __RPC_FAR *pctinfo);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )(
IFace2 __RPC_FAR * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )(
IFace2 __RPC_FAR * This,
/* [in] */ REFIID riid,
/* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
/* [in] */ UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ DISPID __RPC_FAR *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )(
IFace2 __RPC_FAR * This,
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
/* [out] */ VARIANT __RPC_FAR *pVarResult,
/* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
/* [out] */ UINT __RPC_FAR *puArgErr);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Face2Nam )(
IFace2 __RPC_FAR * This,
/* [retval][out] */ BSTR __RPC_FAR *pVal);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Face2Nam )(
IFace2 __RPC_FAR * This,
/* [in] */ BSTR newVal);
END_INTERFACE
} IFace2Vtbl;
interface IFace2
{
CONST_VTBL struct IFace2Vtbl __RPC_FAR *lpVtbl;
};
#ifdef COBJMACROS
#define IFace2_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IFace2_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IFace2_Release(This) \
(This)->lpVtbl -> Release(This)
#define IFace2_GetTypeInfoCount(This,pctinfo) \
(This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
#define IFace2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
(This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IFace2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
(This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IFace2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
(This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IFace2_get_Face2Nam(This,pVal) \
(This)->lpVtbl -> get_Face2Nam(This,pVal)
#define IFace2_put_Face2Nam(This,newVal) \
(This)->lpVtbl -> put_Face2Nam(This,newVal)
#endif /* COBJMACROS */
#endif /* C style interface */
/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IFace2_get_Face2Nam_Proxy(
IFace2 __RPC_FAR * This,
/* [retval][out] */ BSTR __RPC_FAR *pVal);
void __RPC_STUB IFace2_get_Face2Nam_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IFace2_put_Face2Nam_Proxy(
IFace2 __RPC_FAR * This,
/* [in] */ BSTR newVal);
void __RPC_STUB IFace2_put_Face2Nam_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IFace2_INTERFACE_DEFINED__ */
#ifndef __IFace3_INTERFACE_DEFINED__
#define __IFace3_INTERFACE_DEFINED__
/* interface IFace3 */
/* [unique][helpstring][dual][uuid][object] */
EXTERN_C const IID IID_IFace3;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("9BF24411-B2E0-11D4-A695-00104BFF3241")
IFace3 : public IDispatch
{
public:
virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Face3Name(
/* [retval][out] */ BSTR __RPC_FAR *pVal) = 0;
virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Face3Name(
/* [in] */ BSTR newVal) = 0;
};
#else /* C style interface */
typedef struct IFace3Vtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )(
IFace3 __RPC_FAR * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )(
IFace3 __RPC_FAR * This);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )(
IFace3 __RPC_FAR * This);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )(
IFace3 __RPC_FAR * This,
/* [out] */ UINT __RPC_FAR *pctinfo);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )(
IFace3 __RPC_FAR * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )(
IFace3 __RPC_FAR * This,
/* [in] */ REFIID riid,
/* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
/* [in] */ UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ DISPID __RPC_FAR *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )(
IFace3 __RPC_FAR * This,
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
/* [out] */ VARIANT __RPC_FAR *pVarResult,
/* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
/* [out] */ UINT __RPC_FAR *puArgErr);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Face3Name )(
IFace3 __RPC_FAR * This,
/* [retval][out] */ BSTR __RPC_FAR *pVal);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Face3Name )(
IFace3 __RPC_FAR * This,
/* [in] */ BSTR newVal);
END_INTERFACE
} IFace3Vtbl;
interface IFace3
{
CONST_VTBL struct IFace3Vtbl __RPC_FAR *lpVtbl;
};
#ifdef COBJMACROS
#define IFace3_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IFace3_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IFace3_Release(This) \
(This)->lpVtbl -> Release(This)
#define IFace3_GetTypeInfoCount(This,pctinfo) \
(This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
#define IFace3_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
(This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IFace3_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
(This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IFace3_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
(This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IFace3_get_Face3Name(This,pVal) \
(This)->lpVtbl -> get_Face3Name(This,pVal)
#define IFace3_put_Face3Name(This,newVal) \
(This)->lpVtbl -> put_Face3Name(This,newVal)
#endif /* COBJMACROS */
#endif /* C style interface */
/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IFace3_get_Face3Name_Proxy(
IFace3 __RPC_FAR * This,
/* [retval][out] */ BSTR __RPC_FAR *pVal);
void __RPC_STUB IFace3_get_Face3Name_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IFace3_put_Face3Name_Proxy(
IFace3 __RPC_FAR * This,
/* [in] */ BSTR newVal);
void __RPC_STUB IFace3_put_Face3Name_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IFace3_INTERFACE_DEFINED__ */
#ifndef __MULTIFACELib_LIBRARY_DEFINED__
#define __MULTIFACELib_LIBRARY_DEFINED__
/* library MULTIFACELib */
/* [helpstring][version][uuid] */
EXTERN_C const IID LIBID_MULTIFACELib;
EXTERN_C const CLSID CLSID_Face;
#ifdef __cplusplus
class DECLSPEC_UUID("9BF24412-B2E0-11D4-A695-00104BFF3241")
Face;
#endif
#endif /* __MULTIFACELib_LIBRARY_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
unsigned long __RPC_USER BSTR_UserSize( unsigned long __RPC_FAR *, unsigned long , BSTR __RPC_FAR * );
unsigned char __RPC_FAR * __RPC_USER BSTR_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * );
unsigned char __RPC_FAR * __RPC_USER BSTR_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * );
void __RPC_USER BSTR_UserFree( unsigned long __RPC_FAR *, BSTR __RPC_FAR * );
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,70 @@
// MultiFace.idl : IDL source for MultiFace.dll
//
// This file will be processed by the MIDL tool to
// produce the type library (MultiFace.tlb) and marshalling code.
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(9BF2440F-B2E0-11D4-A695-00104BFF3241),
dual,
helpstring("IFace1 Interface"),
pointer_default(unique)
]
interface IFace1 : IDispatch
{
[propget, id(1), helpstring("property Face1Name")] HRESULT Face1Name([out, retval] BSTR *pVal);
[propput, id(1), helpstring("property Face1Name")] HRESULT Face1Name([in] BSTR newVal);
};
[
object,
uuid(9BF24410-B2E0-11D4-A695-00104BFF3241),
dual,
helpstring("IFace2 Interface"),
pointer_default(unique)
]
interface IFace2 : IDispatch
{
[propget, id(1), helpstring("property Face2Nam")] HRESULT Face2Nam([out, retval] BSTR *pVal);
[propput, id(1), helpstring("property Face2Nam")] HRESULT Face2Nam([in] BSTR newVal);
};
[
object,
uuid(9BF24411-B2E0-11D4-A695-00104BFF3241),
dual,
helpstring("IFace3 Interface"),
pointer_default(unique)
]
interface IFace3 : IDispatch
{
[propget, id(1), helpstring("property Face3Name")] HRESULT Face3Name([out, retval] BSTR *pVal);
[propput, id(1), helpstring("property Face3Name")] HRESULT Face3Name([in] BSTR newVal);
};
[
uuid(9BF24403-B2E0-11D4-A695-00104BFF3241),
version(1.0),
helpstring("MultiFace 1.0 Type Library")
]
library MULTIFACELib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[
uuid(9BF24412-B2E0-11D4-A695-00104BFF3241),
helpstring("Face Class")
]
coclass Face
{
[default] interface IFace1;
interface IFace2;
interface IFace3;
};
};

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,48 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: MultiFace - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\TEMP\RSP335.tmp" with contents
[
/nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Fp"Debug/MultiFace.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"D:\jacob_15\samples\test\atl\MultiFace\MultiFace.cpp"
"D:\jacob_15\samples\test\atl\MultiFace\Face.cpp"
]
Creating command line "cl.exe @C:\TEMP\RSP335.tmp"
Creating temporary file "C:\TEMP\RSP336.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"Debug/MultiFace.pdb" /debug /machine:I386 /def:".\MultiFace.def" /out:"Debug/MultiFace.dll" /implib:"Debug/MultiFace.lib" /pdbtype:sept
.\Debug\StdAfx.obj
.\Debug\MultiFace.obj
.\Debug\MultiFace.res
.\Debug\Face.obj
]
Creating command line "link.exe @C:\TEMP\RSP336.tmp"
Creating temporary file "C:\TEMP\RSP337.bat" with contents
[
@echo off
regsvr32 /s /c ".\Debug\MultiFace.dll"
echo regsvr32 exec. time > ".\Debug\regsvr32.trg"
]
Creating command line "C:\TEMP\RSP337.bat"
Compiling...
MultiFace.cpp
Face.cpp
Generating Code...
Linking...
<h3>Output Window</h3>
Performing registration
RegSvr32: DllRegisterServer in .\Debug\MultiFace.dll succeeded.
<h3>Results</h3>
MultiFace.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@@ -0,0 +1,125 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"1 TYPELIB ""MultiFace.tlb""\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "MultiFace Module\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "MultiFace\0"
VALUE "LegalCopyright", "Copyright 2000\0"
VALUE "OriginalFilename", "MultiFace.DLL\0"
VALUE "ProductName", "MultiFace Module\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
VALUE "OLESelfRegister", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// REGISTRY
//
IDR_Face REGISTRY DISCARDABLE "Face.rgs"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_PROJNAME "MultiFace"
IDS_FACE_DESC "Face Class"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
1 TYPELIB "MultiFace.tlb"
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

Binary file not shown.

View File

@@ -0,0 +1,56 @@
/* this file contains the actual definitions of */
/* the IIDs and CLSIDs */
/* link this file in with the server and any clients */
/* File created by MIDL compiler version 5.01.0164 */
/* at Sun Nov 05 01:12:47 2000
*/
/* Compiler settings for D:\jacob_15\samples\test\atl\MultiFace\MultiFace.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
#endif // __IID_DEFINED__
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
const IID IID_IFace1 = {0x9BF2440F,0xB2E0,0x11D4,{0xA6,0x95,0x00,0x10,0x4B,0xFF,0x32,0x41}};
const IID IID_IFace2 = {0x9BF24410,0xB2E0,0x11D4,{0xA6,0x95,0x00,0x10,0x4B,0xFF,0x32,0x41}};
const IID IID_IFace3 = {0x9BF24411,0xB2E0,0x11D4,{0xA6,0x95,0x00,0x10,0x4B,0xFF,0x32,0x41}};
const IID LIBID_MULTIFACELib = {0x9BF24403,0xB2E0,0x11D4,{0xA6,0x95,0x00,0x10,0x4B,0xFF,0x32,0x41}};
const CLSID CLSID_Face = {0x9BF24412,0xB2E0,0x11D4,{0xA6,0x95,0x00,0x10,0x4B,0xFF,0x32,0x41}};
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,570 @@
/* this ALWAYS GENERATED file contains the proxy stub code */
/* File created by MIDL compiler version 5.01.0164 */
/* at Sun Nov 05 01:12:47 2000
*/
/* Compiler settings for D:\jacob_15\samples\test\atl\MultiFace\MultiFace.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#define USE_STUBLESS_PROXY
/* verify that the <rpcproxy.h> version is high enough to compile this file*/
#ifndef __REDQ_RPCPROXY_H_VERSION__
#define __REQUIRED_RPCPROXY_H_VERSION__ 440
#endif
#include "rpcproxy.h"
#ifndef __RPCPROXY_H_VERSION__
#error this stub requires an updated version of <rpcproxy.h>
#endif // __RPCPROXY_H_VERSION__
#include "MultiFace.h"
#define TYPE_FORMAT_STRING_SIZE 55
#define PROC_FORMAT_STRING_SIZE 57
typedef struct _MIDL_TYPE_FORMAT_STRING
{
short Pad;
unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
} MIDL_TYPE_FORMAT_STRING;
typedef struct _MIDL_PROC_FORMAT_STRING
{
short Pad;
unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
} MIDL_PROC_FORMAT_STRING;
extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
/* Object interface: IUnknown, ver. 0.0,
GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
/* Object interface: IDispatch, ver. 0.0,
GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
/* Object interface: IFace1, ver. 0.0,
GUID={0x9BF2440F,0xB2E0,0x11D4,{0xA6,0x95,0x00,0x10,0x4B,0xFF,0x32,0x41}} */
extern const MIDL_STUB_DESC Object_StubDesc;
extern const MIDL_SERVER_INFO IFace1_ServerInfo;
#pragma code_seg(".orpc")
static const unsigned short IFace1_FormatStringOffsetTable[] =
{
(unsigned short) -1,
(unsigned short) -1,
(unsigned short) -1,
(unsigned short) -1,
0,
28
};
static const MIDL_SERVER_INFO IFace1_ServerInfo =
{
&Object_StubDesc,
0,
__MIDL_ProcFormatString.Format,
&IFace1_FormatStringOffsetTable[-3],
0,
0,
0,
0
};
static const MIDL_STUBLESS_PROXY_INFO IFace1_ProxyInfo =
{
&Object_StubDesc,
__MIDL_ProcFormatString.Format,
&IFace1_FormatStringOffsetTable[-3],
0,
0,
0
};
CINTERFACE_PROXY_VTABLE(9) _IFace1ProxyVtbl =
{
&IFace1_ProxyInfo,
&IID_IFace1,
IUnknown_QueryInterface_Proxy,
IUnknown_AddRef_Proxy,
IUnknown_Release_Proxy ,
0 /* (void *)-1 /* IDispatch::GetTypeInfoCount */ ,
0 /* (void *)-1 /* IDispatch::GetTypeInfo */ ,
0 /* (void *)-1 /* IDispatch::GetIDsOfNames */ ,
0 /* IDispatch_Invoke_Proxy */ ,
(void *)-1 /* IFace1::get_Face1Name */ ,
(void *)-1 /* IFace1::put_Face1Name */
};
static const PRPC_STUB_FUNCTION IFace1_table[] =
{
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
NdrStubCall2,
NdrStubCall2
};
CInterfaceStubVtbl _IFace1StubVtbl =
{
&IID_IFace1,
&IFace1_ServerInfo,
9,
&IFace1_table[-3],
CStdStubBuffer_DELEGATING_METHODS
};
/* Object interface: IFace2, ver. 0.0,
GUID={0x9BF24410,0xB2E0,0x11D4,{0xA6,0x95,0x00,0x10,0x4B,0xFF,0x32,0x41}} */
extern const MIDL_STUB_DESC Object_StubDesc;
extern const MIDL_SERVER_INFO IFace2_ServerInfo;
#pragma code_seg(".orpc")
static const unsigned short IFace2_FormatStringOffsetTable[] =
{
(unsigned short) -1,
(unsigned short) -1,
(unsigned short) -1,
(unsigned short) -1,
0,
28
};
static const MIDL_SERVER_INFO IFace2_ServerInfo =
{
&Object_StubDesc,
0,
__MIDL_ProcFormatString.Format,
&IFace2_FormatStringOffsetTable[-3],
0,
0,
0,
0
};
static const MIDL_STUBLESS_PROXY_INFO IFace2_ProxyInfo =
{
&Object_StubDesc,
__MIDL_ProcFormatString.Format,
&IFace2_FormatStringOffsetTable[-3],
0,
0,
0
};
CINTERFACE_PROXY_VTABLE(9) _IFace2ProxyVtbl =
{
&IFace2_ProxyInfo,
&IID_IFace2,
IUnknown_QueryInterface_Proxy,
IUnknown_AddRef_Proxy,
IUnknown_Release_Proxy ,
0 /* (void *)-1 /* IDispatch::GetTypeInfoCount */ ,
0 /* (void *)-1 /* IDispatch::GetTypeInfo */ ,
0 /* (void *)-1 /* IDispatch::GetIDsOfNames */ ,
0 /* IDispatch_Invoke_Proxy */ ,
(void *)-1 /* IFace2::get_Face2Nam */ ,
(void *)-1 /* IFace2::put_Face2Nam */
};
static const PRPC_STUB_FUNCTION IFace2_table[] =
{
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
NdrStubCall2,
NdrStubCall2
};
CInterfaceStubVtbl _IFace2StubVtbl =
{
&IID_IFace2,
&IFace2_ServerInfo,
9,
&IFace2_table[-3],
CStdStubBuffer_DELEGATING_METHODS
};
/* Object interface: IFace3, ver. 0.0,
GUID={0x9BF24411,0xB2E0,0x11D4,{0xA6,0x95,0x00,0x10,0x4B,0xFF,0x32,0x41}} */
extern const MIDL_STUB_DESC Object_StubDesc;
extern const MIDL_SERVER_INFO IFace3_ServerInfo;
#pragma code_seg(".orpc")
extern const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[1];
static const MIDL_STUB_DESC Object_StubDesc =
{
0,
NdrOleAllocate,
NdrOleFree,
0,
0,
0,
0,
0,
__MIDL_TypeFormatString.Format,
1, /* -error bounds_check flag */
0x20000, /* Ndr library version */
0,
0x50100a4, /* MIDL Version 5.1.164 */
0,
UserMarshalRoutines,
0, /* notify & notify_flag routine table */
1, /* Flags */
0, /* Reserved3 */
0, /* Reserved4 */
0 /* Reserved5 */
};
static const unsigned short IFace3_FormatStringOffsetTable[] =
{
(unsigned short) -1,
(unsigned short) -1,
(unsigned short) -1,
(unsigned short) -1,
0,
28
};
static const MIDL_SERVER_INFO IFace3_ServerInfo =
{
&Object_StubDesc,
0,
__MIDL_ProcFormatString.Format,
&IFace3_FormatStringOffsetTable[-3],
0,
0,
0,
0
};
static const MIDL_STUBLESS_PROXY_INFO IFace3_ProxyInfo =
{
&Object_StubDesc,
__MIDL_ProcFormatString.Format,
&IFace3_FormatStringOffsetTable[-3],
0,
0,
0
};
CINTERFACE_PROXY_VTABLE(9) _IFace3ProxyVtbl =
{
&IFace3_ProxyInfo,
&IID_IFace3,
IUnknown_QueryInterface_Proxy,
IUnknown_AddRef_Proxy,
IUnknown_Release_Proxy ,
0 /* (void *)-1 /* IDispatch::GetTypeInfoCount */ ,
0 /* (void *)-1 /* IDispatch::GetTypeInfo */ ,
0 /* (void *)-1 /* IDispatch::GetIDsOfNames */ ,
0 /* IDispatch_Invoke_Proxy */ ,
(void *)-1 /* IFace3::get_Face3Name */ ,
(void *)-1 /* IFace3::put_Face3Name */
};
static const PRPC_STUB_FUNCTION IFace3_table[] =
{
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
NdrStubCall2,
NdrStubCall2
};
CInterfaceStubVtbl _IFace3StubVtbl =
{
&IID_IFace3,
&IFace3_ServerInfo,
9,
&IFace3_table[-3],
CStdStubBuffer_DELEGATING_METHODS
};
#pragma data_seg(".rdata")
static const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[1] =
{
{
BSTR_UserSize
,BSTR_UserMarshal
,BSTR_UserUnmarshal
,BSTR_UserFree
}
};
#if !defined(__RPC_WIN32__)
#error Invalid build platform for this stub.
#endif
#if !(TARGET_IS_NT40_OR_LATER)
#error You need a Windows NT 4.0 or later to run this stub because it uses these features:
#error -Oif or -Oicf, [wire_marshal] or [user_marshal] attribute, more than 32 methods in the interface.
#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
#error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
#endif
static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
{
0,
{
/* Procedure get_Face3Name */
/* Procedure get_Face2Nam */
/* Procedure get_Face1Name */
0x33, /* FC_AUTO_HANDLE */
0x6c, /* Old Flags: object, Oi2 */
/* 2 */ NdrFcLong( 0x0 ), /* 0 */
/* 6 */ NdrFcShort( 0x7 ), /* 7 */
#ifndef _ALPHA_
/* 8 */ NdrFcShort( 0xc ), /* x86, MIPS, PPC Stack size/offset = 12 */
#else
NdrFcShort( 0x18 ), /* Alpha Stack size/offset = 24 */
#endif
/* 10 */ NdrFcShort( 0x0 ), /* 0 */
/* 12 */ NdrFcShort( 0x8 ), /* 8 */
/* 14 */ 0x5, /* Oi2 Flags: srv must size, has return, */
0x2, /* 2 */
/* Parameter pVal */
/* Parameter pVal */
/* Parameter pVal */
/* 16 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */
#ifndef _ALPHA_
/* 18 */ NdrFcShort( 0x4 ), /* x86, MIPS, PPC Stack size/offset = 4 */
#else
NdrFcShort( 0x8 ), /* Alpha Stack size/offset = 8 */
#endif
/* 20 */ NdrFcShort( 0x1e ), /* Type Offset=30 */
/* Return value */
/* Return value */
/* Return value */
/* 22 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
#ifndef _ALPHA_
/* 24 */ NdrFcShort( 0x8 ), /* x86, MIPS, PPC Stack size/offset = 8 */
#else
NdrFcShort( 0x10 ), /* Alpha Stack size/offset = 16 */
#endif
/* 26 */ 0x8, /* FC_LONG */
0x0, /* 0 */
/* Procedure put_Face3Name */
/* Procedure put_Face2Nam */
/* Procedure put_Face1Name */
/* 28 */ 0x33, /* FC_AUTO_HANDLE */
0x6c, /* Old Flags: object, Oi2 */
/* 30 */ NdrFcLong( 0x0 ), /* 0 */
/* 34 */ NdrFcShort( 0x8 ), /* 8 */
#ifndef _ALPHA_
/* 36 */ NdrFcShort( 0xc ), /* x86, MIPS, PPC Stack size/offset = 12 */
#else
NdrFcShort( 0x18 ), /* Alpha Stack size/offset = 24 */
#endif
/* 38 */ NdrFcShort( 0x0 ), /* 0 */
/* 40 */ NdrFcShort( 0x8 ), /* 8 */
/* 42 */ 0x6, /* Oi2 Flags: clt must size, has return, */
0x2, /* 2 */
/* Parameter newVal */
/* Parameter newVal */
/* Parameter newVal */
/* 44 */ NdrFcShort( 0x8b ), /* Flags: must size, must free, in, by val, */
#ifndef _ALPHA_
/* 46 */ NdrFcShort( 0x4 ), /* x86, MIPS, PPC Stack size/offset = 4 */
#else
NdrFcShort( 0x8 ), /* Alpha Stack size/offset = 8 */
#endif
/* 48 */ NdrFcShort( 0x2c ), /* Type Offset=44 */
/* Return value */
/* Return value */
/* Return value */
/* 50 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
#ifndef _ALPHA_
/* 52 */ NdrFcShort( 0x8 ), /* x86, MIPS, PPC Stack size/offset = 8 */
#else
NdrFcShort( 0x10 ), /* Alpha Stack size/offset = 16 */
#endif
/* 54 */ 0x8, /* FC_LONG */
0x0, /* 0 */
0x0
}
};
static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
{
0,
{
NdrFcShort( 0x0 ), /* 0 */
/* 2 */
0x11, 0x4, /* FC_RP [alloced_on_stack] */
/* 4 */ NdrFcShort( 0x1a ), /* Offset= 26 (30) */
/* 6 */
0x13, 0x0, /* FC_OP */
/* 8 */ NdrFcShort( 0xc ), /* Offset= 12 (20) */
/* 10 */
0x1b, /* FC_CARRAY */
0x1, /* 1 */
/* 12 */ NdrFcShort( 0x2 ), /* 2 */
/* 14 */ 0x9, /* Corr desc: FC_ULONG */
0x0, /* */
/* 16 */ NdrFcShort( 0xfffc ), /* -4 */
/* 18 */ 0x6, /* FC_SHORT */
0x5b, /* FC_END */
/* 20 */
0x17, /* FC_CSTRUCT */
0x3, /* 3 */
/* 22 */ NdrFcShort( 0x8 ), /* 8 */
/* 24 */ NdrFcShort( 0xfffffff2 ), /* Offset= -14 (10) */
/* 26 */ 0x8, /* FC_LONG */
0x8, /* FC_LONG */
/* 28 */ 0x5c, /* FC_PAD */
0x5b, /* FC_END */
/* 30 */ 0xb4, /* FC_USER_MARSHAL */
0x83, /* 131 */
/* 32 */ NdrFcShort( 0x0 ), /* 0 */
/* 34 */ NdrFcShort( 0x4 ), /* 4 */
/* 36 */ NdrFcShort( 0x0 ), /* 0 */
/* 38 */ NdrFcShort( 0xffffffe0 ), /* Offset= -32 (6) */
/* 40 */
0x12, 0x0, /* FC_UP */
/* 42 */ NdrFcShort( 0xffffffea ), /* Offset= -22 (20) */
/* 44 */ 0xb4, /* FC_USER_MARSHAL */
0x83, /* 131 */
/* 46 */ NdrFcShort( 0x0 ), /* 0 */
/* 48 */ NdrFcShort( 0x4 ), /* 4 */
/* 50 */ NdrFcShort( 0x0 ), /* 0 */
/* 52 */ NdrFcShort( 0xfffffff4 ), /* Offset= -12 (40) */
0x0
}
};
const CInterfaceProxyVtbl * _MultiFace_ProxyVtblList[] =
{
( CInterfaceProxyVtbl *) &_IFace1ProxyVtbl,
( CInterfaceProxyVtbl *) &_IFace2ProxyVtbl,
( CInterfaceProxyVtbl *) &_IFace3ProxyVtbl,
0
};
const CInterfaceStubVtbl * _MultiFace_StubVtblList[] =
{
( CInterfaceStubVtbl *) &_IFace1StubVtbl,
( CInterfaceStubVtbl *) &_IFace2StubVtbl,
( CInterfaceStubVtbl *) &_IFace3StubVtbl,
0
};
PCInterfaceName const _MultiFace_InterfaceNamesList[] =
{
"IFace1",
"IFace2",
"IFace3",
0
};
const IID * _MultiFace_BaseIIDList[] =
{
&IID_IDispatch,
&IID_IDispatch,
&IID_IDispatch,
0
};
#define _MultiFace_CHECK_IID(n) IID_GENERIC_CHECK_IID( _MultiFace, pIID, n)
int __stdcall _MultiFace_IID_Lookup( const IID * pIID, int * pIndex )
{
IID_BS_LOOKUP_SETUP
IID_BS_LOOKUP_INITIAL_TEST( _MultiFace, 3, 2 )
IID_BS_LOOKUP_NEXT_TEST( _MultiFace, 1 )
IID_BS_LOOKUP_RETURN_RESULT( _MultiFace, 3, *pIndex )
}
const ExtendedProxyFileInfo MultiFace_ProxyFileInfo =
{
(PCInterfaceProxyVtblList *) & _MultiFace_ProxyVtblList,
(PCInterfaceStubVtblList *) & _MultiFace_StubVtblList,
(const PCInterfaceName * ) & _MultiFace_InterfaceNamesList,
(const IID ** ) & _MultiFace_BaseIIDList,
& _MultiFace_IID_Lookup,
3,
2,
0, /* table of [async_uuid] interfaces */
0, /* Filler1 */
0, /* Filler2 */
0 /* Filler3 */
};

View File

@@ -0,0 +1,11 @@
LIBRARY "MultiFacePS"
DESCRIPTION 'Proxy/Stub DLL'
EXPORTS
DllGetClassObject @1 PRIVATE
DllCanUnloadNow @2 PRIVATE
GetProxyDllInfo @3 PRIVATE
DllRegisterServer @4 PRIVATE
DllUnregisterServer @5 PRIVATE

View File

@@ -0,0 +1,16 @@
MultiFaceps.dll: dlldata.obj MultiFace_p.obj MultiFace_i.obj
link /dll /out:MultiFaceps.dll /def:MultiFaceps.def /entry:DllMain dlldata.obj MultiFace_p.obj MultiFace_i.obj \
kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \
.c.obj:
cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \
$<
clean:
@del MultiFaceps.dll
@del MultiFaceps.lib
@del MultiFaceps.exp
@del dlldata.obj
@del MultiFace_p.obj
@del MultiFace_i.obj

View File

@@ -0,0 +1,12 @@
// stdafx.cpp : source file that includes just the standard includes
// stdafx.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
#ifdef _ATL_STATIC_REGISTRY
#include <statreg.h>
#include <statreg.cpp>
#endif
#include <atlimpl.cpp>

View File

@@ -0,0 +1,27 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#if !defined(AFX_STDAFX_H__9BF24406_B2E0_11D4_A695_00104BFF3241__INCLUDED_)
#define AFX_STDAFX_H__9BF24406_B2E0_11D4_A695_00104BFF3241__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define STRICT
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
#define _ATL_APARTMENT_THREADED
#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
extern CComModule _Module;
#include <atlcom.h>
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__9BF24406_B2E0_11D4_A695_00104BFF3241__INCLUDED)

View File

@@ -0,0 +1,38 @@
/*********************************************************
DllData file -- generated by MIDL compiler
DO NOT ALTER THIS FILE
This file is regenerated by MIDL on every IDL file compile.
To completely reconstruct this file, delete it and rerun MIDL
on all the IDL files in this DLL, specifying this file for the
/dlldata command line option
*********************************************************/
#define PROXY_DELEGATION
#include <rpcproxy.h>
#ifdef __cplusplus
extern "C" {
#endif
EXTERN_PROXY_FILE( MultiFace )
PROXYFILE_LIST_START
/* Start of list */
REFERENCE_PROXY_FILE( MultiFace ),
/* End of list */
PROXYFILE_LIST_END
DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )
#ifdef __cplusplus
} /*extern "C" */
#endif
/* end of generated dlldata file */

View File

@@ -0,0 +1,18 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by MultiFace.rc
//
#define IDS_PROJNAME 100
#define IDS_FACE_DESC 101
#define IDR_Face 102
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 201
#define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 201
#define _APS_NEXT_SYMED_VALUE 103
#endif
#endif

View File

@@ -0,0 +1,37 @@
package com.jacob.test.atl;
import com.jacob.com.*;
import com.jacob.activeX.*;
class MultiFaceTest {
public static void main(String[] args) {
// this method has been deprecated as being unreliable.
// shutdown should be done through other means
// whoever wrote this example should explain what this was intended to do
//System.runFinalizersOnExit(true);
ActiveXComponent mf = new ActiveXComponent("MultiFace.Face");
try {
// I am now dealing with the default interface (IFace1)
Dispatch.put(mf, "Face1Name", new Variant("Hello Face1"));
System.out.println(Dispatch.get(mf, "Face1Name"));
// get to IFace2 through the IID
Dispatch f2 = mf
.QueryInterface("{9BF24410-B2E0-11D4-A695-00104BFF3241}");
// I am now dealing with IFace2
Dispatch.put(f2, "Face2Nam", new Variant("Hello Face2"));
System.out.println(Dispatch.get(f2, "Face2Nam"));
// get to IFace3 through the IID
Dispatch f3 = mf
.QueryInterface("{9BF24411-B2E0-11D4-A695-00104BFF3241}");
// I am now dealing with IFace3
Dispatch.put(f3, "Face3Name", new Variant("Hello Face3"));
System.out.println(Dispatch.get(f3, "Face3Name"));
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,14 @@
This example demonstrates how to access multiple interfaces.
To run it, chdir to MultiFace\Debug and run:
regsvr32 MultiFace.dll
Then, run (in this dir):
java MultiFace
As you can see from MultiFace\MultiFace.idl - there are 3 interfaces.
By default JACOB attaches to the default interface.
The file MultiFace.java shows how to use the new Dispatch.QueryInterface
to get access to the other interfaces.

View File

@@ -1,7 +1,11 @@
package com.jacob.com;
package com.jacob.test.events;
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.ComException;
import com.jacob.com.Dispatch;
import com.jacob.com.DispatchEvents;
import com.jacob.com.InvocationProxy;
import com.jacob.com.Variant;
/**
* This test was lifted from a forum posting and shows how you can't listen to

View File

@@ -0,0 +1,176 @@
package com.jacob.test.events;
import com.jacob.com.*;
import com.jacob.activeX.*;
/**
* It looks like this test is broken again on the cleanup
*
* This demonstrates the new event handling code in jacob 1.7
* This example will open up IE and print out some of the events
* it listens to as it havigates to web sites.
* contributed by Niels Olof Bouvin mailto:n.o.bouvin@daimi.au.dk
* and Henning Jae jehoej@daimi.au.dk
* <P>
* You can run this in eclipse with the command line options
* <code> -Djava.library.path=d:/jacob/release -Dcom.jacob.autogc=false </code>
*/
class IETest
{
public static void main(String[] args)
{
// this line starts the pump but it runs fine without it
ComThread.startMainSTA();
// remove this line and it dies
///ComThread.InitMTA(true);
IETestThread aThread = new IETestThread();
aThread.start();
while (aThread.isAlive()){
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// doen with the sleep
//e.printStackTrace();
}
}
System.out.println("Thread quit, about to quit main sta");
// this line only does someting if startMainSTA() was called
ComThread.quitMainSTA();
System.out.println("did quit main sta");
}
}
class IETestThread extends Thread
{
public static boolean quitHandled = false;
public IETestThread(){
super();
}
public void run()
{
// this used to be 5 seconds but sourceforge is slow
int delay = 10000; // msec
// paired with statement below that blows up
ComThread.InitMTA();
ActiveXComponent ie = new ActiveXComponent("InternetExplorer.Application");
try {
Dispatch.put(ie, "Visible", new Variant(true));
Dispatch.put(ie, "AddressBar", new Variant(true));
System.out.println(Dispatch.get(ie, "Path"));
Dispatch.put(ie, "StatusText", new Variant("My Status Text"));
IEEvents ieE = new IEEvents();
new DispatchEvents((Dispatch) ie, ieE,"InternetExplorer.Application.1");
Variant optional = new Variant();
optional.noParam();
Dispatch.call(ie, "Navigate", new Variant("http://sourceforge.net/projects/jacob-project"));
try { Thread.sleep(delay); } catch (Exception e) {}
Dispatch.call(ie, "Navigate", new Variant("http://groups.yahoo.com/group/jacob-project"));
try { Thread.sleep(delay); } catch (Exception e) {}
} catch (Exception e) {
e.printStackTrace();
} finally {
ie.invoke("Quit", new Variant[] {});
}
// this blows up when it tries to release a DispatchEvents object
// I think this is because there is still one event we should get back
// "OnQuit" that will came after we have released the thread pool
// this is probably messed up because DispatchEvent object will have been
// freed before the callback
// commenting out ie.invoke(quit...) causes this to work without error
// this code tries to wait until the quit has been handled but that doesn't work
System.out.println("IETest: Waiting until we've received the quit callback");
while (!quitHandled){
try { Thread.sleep(delay/5);} catch (InterruptedException e) {}
}
// wait a little while for it to end
try {Thread.sleep(delay); } catch (InterruptedException e) {}
System.out.println("IETest: about to call release in thread " +
Thread.currentThread().getName());
ComThread.Release();
}
/**
* the events class must be publicly accessable for reflection to work
*/
public class IEEvents
{
public void BeforeNavigate2(Variant[] args) {
System.out.println("IEEvents: BeforeNavigate2");
}
public void CommandStateChange(Variant[] args) {
System.out.println("IEEvents: CommandStateChange");
}
public void DocumentComplete(Variant[] args) {
System.out.println("IEEvents: DocumentComplete");
}
public void DownloadBegin(Variant[] args) {
System.out.println("IEEvents: DownloadBegin");
}
public void DownloadComplete(Variant[] args) {
System.out.println("IEEvents: DownloadComplete");
}
public void NavigateComplete2(Variant[] args) {
System.out.println("IEEvents: NavigateComplete2");
}
public void NewWindow2(Variant[] args) {
System.out.println("IEEvents: NewWindow2");
}
public void OnFullScreen(Variant[] args) {
System.out.println("IEEvents: OnFullScreen");
}
public void OnMenuBar(Variant[] args) {
System.out.println("IEEvents: OnMenuBar");
}
public void OnQuit(Variant[] args) {
System.out.println("IEEvents: OnQuit");
IETestThread.quitHandled = true;
}
public void OnStatusBar(Variant[] args) {
System.out.println("IEEvents: OnStatusBar");
}
public void OnTheaterMode(Variant[] args) {
System.out.println("IEEvents: OnTheaterMode");
}
public void OnToolBar(Variant[] args) {
System.out.println("IEEvents: OnToolBar");
}
public void OnVisible(Variant[] args) {
System.out.println("IEEvents: OnVisible");
}
public void ProgressChange(Variant[] args) {
System.out.println("IEEvents: ProgressChange");
}
public void PropertyChange(Variant[] args) {
System.out.println("IEEvents: PropertyChange");
}
public void StatusTextChange(Variant[] args) {
System.out.println("IEEvents: StatusTextChange");
}
public void TitleChange(Variant[] args) {
System.out.println("IEEvents: TitleChange");
}
}
}

View File

@@ -1,12 +1,17 @@
package com.jacob.com;
package com.jacob.test.events;
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.ComException;
import com.jacob.com.DispatchEvents;
import com.jacob.com.InvocationProxy;
import com.jacob.com.Variant;
/**
* This test was lifted from a forum posting and shows how you can't listen to
* Excel events (added post 1.9.1 Eclipse Settings.) This also uses the 1.9.1
* Excel events (added post 1.9.1 Eclipse Settings.)
* That test was modified make this a MSWord event listener to demonstrate
* that the InvocationProxy code works with MS Word Events
* This also uses the 1.10
* InvocationProxy to receive the events.
* <p> supported command line options with default values are
* -Djava.library.path=d:/jacob/release -Dcom.jacob.autogc=false
@@ -15,7 +20,7 @@ import com.jacob.com.DispatchEvents;
public class WordEventTest extends InvocationProxy {
/**
* load up excel, register for events and make stuff happen
* load up word, register for events and make stuff happen
* @param args
*/
public static void main(String args[]) {
@@ -57,6 +62,10 @@ public class WordEventTest extends InvocationProxy {
+ cfe.getMessage());
}
System.out.println(
"Someone needs to add some MSWord commands to this to " +
"make some on screen stuff happens so the tester " +
"thinks we tested something");
}
/**

View File

@@ -0,0 +1,108 @@
package com.jacob.test.powerpoint;
/**
* $Id$
*
* This is really more of a multi threaded tester
*
* run with
* -Djava.library.path=d:/jacob/release -Dcom.jacob.autogc=false -Dcom.jacob.debug=false
*/
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.ComThread;
import com.jacob.com.Dispatch;
/**
*
* power point test program posted to sourceforge to demonstrate memory problem.
* The submitter stated they had the problem on windows 2000 with office 2000
* I have been unable to duplicate on windows XP with office 2003.
* I am comitting this to the tree just in case we need to come back to it.
*/
public class PowerpointTest extends Thread {
private static final int NUM_THREADS = 5;
protected static final int NUM_ITERATIONS = 50;
private static String POWERPOINT_TEST_PATH =
"D:\\jacob\\samples\\com\\jacob\\test\\powerpoint";
//"c:\\PowerpointTest\test";
private int threadID;
private Dispatch comPowerpoint;
public PowerpointTest(int threadID, Dispatch comPowerpoint) {
super("TestThread "+threadID);
this.threadID = threadID;
this.comPowerpoint = comPowerpoint;
}
public void run() {
System.out.println("Thread \""+Thread.currentThread().getName()+"\" started");
System.out.flush();
ComThread.InitMTA();
try {
for (int i=0; i<NUM_ITERATIONS; i++) {
if (i % 10 == 0) {
System.out.println(Thread.currentThread().getName()+": Iteration "+i);
System.out.flush();
}
Dispatch comPresentations = Dispatch.get(comPowerpoint,"Presentations").toDispatch();
Dispatch comPresentation = Dispatch.call(comPresentations,
"Open",
POWERPOINT_TEST_PATH+"\\test"+threadID+".ppt",
new Integer(0),
new Integer(0),
new Integer(0)).toDispatch();
Dispatch.call(comPresentation, "Close");
}
} catch (Exception e) {
System.err.println("Error in Thread \""+Thread.currentThread().getName()+"\":");
e.printStackTrace();
} finally {
ComThread.Release();
System.out.println("Thread \""+Thread.currentThread().getName()+"\" finished");
System.out.flush();
}
}
/**
* main program that lets us run this as a test
* @param args
*/
public static void main(String[] args) {
ComThread.InitMTA();
ActiveXComponent component = new ActiveXComponent("Powerpoint.Application");
Dispatch comPowerpoint = component.getObject();
try {
PowerpointTest[] threads = new PowerpointTest[NUM_THREADS];
for (int i=0; i<NUM_THREADS; i++) {
threads[i] = new PowerpointTest(i+1, comPowerpoint);
threads[i].start();
}
boolean allThreadsFinished = false;
while (!allThreadsFinished) {
allThreadsFinished = true;
for (int i=0; i<NUM_THREADS; i++) {
if (threads[i].isAlive()) {
allThreadsFinished = false;
break;
}
}
if (!allThreadsFinished) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
// no op
}
}
}
Dispatch.call(comPowerpoint,"Quit");
} finally {
ComThread.Release();
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,276 @@
package com.jacob.test.safearray;
import com.jacob.com.*;
class SafeArrayContents
{
public static void printArray(boolean a[])
{
System.out.print("[");
for(int i=0;i<a.length;i++) {
System.out.print(" " + a[i] + " ");
}
System.out.println("]");
}
public static void printArray(int a[])
{
System.out.print("[");
for(int i=0;i<a.length;i++) {
System.out.print(" " + a[i] + " ");
}
System.out.println("]");
}
public static void printArray(short a[])
{
System.out.print("[");
for(int i=0;i<a.length;i++) {
System.out.print(" " + a[i] + " ");
}
System.out.println("]");
}
public static void printArray(byte a[])
{
System.out.print("[");
for(int i=0;i<a.length;i++) {
System.out.print(" " + a[i] + " ");
}
System.out.println("]");
}
public static void printArray(double a[])
{
System.out.print("[");
for(int i=0;i<a.length;i++) {
System.out.print(" " + a[i] + " ");
}
System.out.println("]");
}
public static void printArray(float a[])
{
System.out.print("[");
for(int i=0;i<a.length;i++) {
System.out.print(" " + a[i] + " ");
}
System.out.println("]");
}
public static void printArray(String a[])
{
System.out.print("[");
for(int i=0;i<a.length;i++) {
System.out.print(" " + a[i] + " ");
}
System.out.println("]");
}
public static void printArray(Variant a[])
{
System.out.print("[");
for(int i=0;i<a.length;i++) {
System.out.print(" " + a[i] + " ");
}
System.out.println("]");
}
public static void printArray(char a[])
{
System.out.print("[");
for(int i=0;i<a.length;i++) {
System.out.print(" " + a[i] + " ");
}
System.out.println("]");
}
public static void main(String[] args)
{
// int
System.out.println("Int");
SafeArray ia = new SafeArray(Variant.VariantInt,4);
System.out.println("elem size:"+ia.getElemSize());
int iack[] = new int[] {100000,200000,300000,400000};
printArray(iack);
ia.fromIntArray(iack);
iack = ia.toIntArray();
printArray(iack);
int i4[] = new int[4];
ia.getInts(0, 4, i4, 0);
printArray(i4);
SafeArray ia2 = new SafeArray(Variant.VariantInt,4);
ia2.setInts(0, 4, i4, 0);
iack = ia2.toIntArray();
printArray(iack);
// double
System.out.println("Double");
SafeArray da = new SafeArray(Variant.VariantDouble,4);
System.out.println("elem size:"+da.getElemSize());
double dack[] = new double[] {123.456,456.123,1234567.89,12.3456789};
printArray(dack);
da.fromDoubleArray(dack);
dack = da.toDoubleArray();
printArray(dack);
double d4[] = new double[4];
da.getDoubles(0, 4, d4, 0);
printArray(d4);
SafeArray da2 = new SafeArray(Variant.VariantDouble,4);
da2.setDoubles(0, 4, d4, 0);
dack = da2.toDoubleArray();
printArray(dack);
// float
System.out.println("Float");
SafeArray fa = new SafeArray(Variant.VariantFloat,4);
System.out.println("elem size:"+fa.getElemSize());
float fack[] = new float[] {123.456F,456.123F,1234567.89F,12.3456789F};
printArray(fack);
fa.fromFloatArray(fack);
fack = fa.toFloatArray();
printArray(fack);
float f4[] = new float[4];
fa.getFloats(0, 4, f4, 0);
printArray(f4);
SafeArray fa2 = new SafeArray(Variant.VariantFloat,4);
fa2.setFloats(0, 4, f4, 0);
fack = fa2.toFloatArray();
printArray(fack);
// boolean
System.out.println("Boolean");
SafeArray ba = new SafeArray(Variant.VariantBoolean,4);
System.out.println("elem size:"+ba.getElemSize());
boolean back[] = new boolean[] {true, false, true, false};
printArray(back);
ba.fromBooleanArray(back);
back = ba.toBooleanArray();
printArray(back);
boolean b4[] = new boolean[4];
ba.getBooleans(0, 4, b4, 0);
printArray(b4);
SafeArray ba2 = new SafeArray(Variant.VariantBoolean,4);
ba2.setBooleans(0, 4, b4, 0);
back = ba2.toBooleanArray();
printArray(back);
// char
System.out.println("Char");
SafeArray ca = new SafeArray(Variant.VariantShort,4);
System.out.println("elem size:"+ca.getElemSize());
char cack[] = new char[] {'a','b','c','d'};
printArray(cack);
ca.fromCharArray(cack);
cack = ca.toCharArray();
printArray(cack);
char c4[] = new char[4];
ca.getChars(0, 4, c4, 0);
printArray(c4);
SafeArray ca2 = new SafeArray(Variant.VariantShort,4);
ca2.setChars(0, 4, c4, 0);
cack = ca2.toCharArray();
printArray(cack);
// short
System.out.println("Short");
SafeArray sha = new SafeArray(Variant.VariantShort,4);
System.out.println("elem size:"+sha.getElemSize());
short shack[] = new short[] {1000,2000,3000,4000};
printArray(shack);
sha.fromShortArray(shack);
shack = sha.toShortArray();
printArray(shack);
short sh4[] = new short[4];
sha.getShorts(0, 4, sh4, 0);
printArray(sh4);
SafeArray sha2 = new SafeArray(Variant.VariantShort,4);
sha2.setShorts(0, 4, sh4, 0);
shack = sha2.toShortArray();
printArray(shack);
// string
System.out.println("String");
SafeArray sa = new SafeArray(Variant.VariantString,4);
System.out.println("elem size:"+sa.getElemSize());
String sack[] = new String[] {"aa","bb","cc","dd"};
printArray(sack);
sa.fromStringArray(sack);
sack = sa.toStringArray();
printArray(sack);
String s4[] = new String[4];
sa.getStrings(0, 4, s4, 0);
printArray(s4);
SafeArray sa2 = new SafeArray(Variant.VariantString,4);
sa2.setStrings(0, 4, s4, 0);
sack = sa2.toStringArray();
printArray(sack);
// variant
System.out.println("Variant");
SafeArray va = new SafeArray(Variant.VariantVariant,4);
System.out.println("elem size:"+va.getElemSize());
Variant vack[] = new Variant[]
{
new Variant(1),
new Variant(2.3),
new Variant(true),
new Variant("four"),
};
printArray(vack);
va.fromVariantArray(vack);
vack = va.toVariantArray();
printArray(vack);
Variant v4[] = new Variant[4];
va.getVariants(0, 4, v4, 0);
printArray(v4);
SafeArray va2 = new SafeArray(Variant.VariantVariant,4);
va2.setVariants(0, 4, v4, 0);
vack = va2.toVariantArray();
printArray(vack);
// byte
System.out.println("Byte");
SafeArray bba = new SafeArray(Variant.VariantByte,4);
System.out.println("elem size:"+bba.getElemSize());
byte bback[] = new byte[] {0x1,0x2,0x3,0x4};
printArray(bback);
bba.fromByteArray(bback);
bback = bba.toByteArray();
printArray(bback);
byte bb4[] = new byte[4];
bba.getBytes(0, 4, bb4, 0);
printArray(bb4);
SafeArray bba2 = new SafeArray(Variant.VariantByte,4);
bba2.setBytes(0, 4, bb4, 0);
bback = bba2.toByteArray();
printArray(bback);
try {
System.out.println("Should see a com exception right after this line...");
// this should throw ComException
bba2.fromCharArray(new char[] {'a'});
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@@ -1,4 +1,8 @@
package com.jacob.com;
package com.jacob.test.safearray;
import com.jacob.com.ComThread;
import com.jacob.com.SafeArray;
import com.jacob.com.Variant;
/**
* run with -Djava.library.path=d:/jacob/release -Dcom.jacob.autogc=false -Dcom.jacob.debug=false

View File

@@ -0,0 +1,60 @@
package com.jacob.test.safearray;
import com.jacob.com.*;
import com.jacob.activeX.*;
public class SafeArrayViaExcel
{
public static void main(java.lang.String[] args)
{
//deprecated
//System.runFinalizersOnExit(true);
ActiveXComponent xl = new ActiveXComponent("Excel.Application");
try {
Dispatch cell;
SafeArray sAProdText;
Dispatch workbooks = xl.getProperty("Workbooks").toDispatch();
System.out.println("have workbooks");
Dispatch workbook = Dispatch.call(workbooks, "Open", "d:\\jacob\\samples\\test\\ExcelSafeArray" +
".xls").toDispatch();
System.out.println("Opened File - jacobtest.xls\n");
Dispatch sheet = Dispatch.get(workbook,"ActiveSheet").toDispatch();
cell = Dispatch.invoke(sheet,"Range",Dispatch.Get,new Object[] {"A1:D1000"},new int[1]).toDispatch();
System.out.println("have cell:"+cell);
sAProdText = Dispatch.get(cell,"Value").toSafeArray();
System.out.println("sa: dim="+sAProdText.getNumDim());
System.out.println("sa: start row="+sAProdText.getLBound(1));
System.out.println("sa: start col="+sAProdText.getLBound(2));
System.out.println("sa: end row="+sAProdText.getUBound(1));
System.out.println("sa: end col="+sAProdText.getUBound(2));
int i;
int lineNumber=1;
int n = 0;
for(lineNumber=1; lineNumber < 1000; lineNumber++)
{
for (i = 1 ; i < 4 ; i++ ) {
System.out.println((n++) + " " + lineNumber+" "+i+" " +sAProdText.getString(lineNumber,i));
/*
if (sAProdText.getString(lineNumber,i).compareTo("aaaa") != 0 ) {
System.out.println("Invalid String in line " + lineNumber + " Cell " + i + " Value = " + sAProdText.getString(lineNumber,i));
stringFound = false;
}
}
if (stringFound) {
System.out.println("Valid Strings in line " + lineNumber);
lineNumber++;
}
*/
}
}
Dispatch.call(workbook, "Close");
System.out.println("Closed File\n");
} catch (Exception e) {
e.printStackTrace();
} finally {
xl.invoke("Quit", new Variant[] {});
}
}
}

View File

@@ -0,0 +1,42 @@
package com.jacob.test.safearray;
import com.jacob.com.*;
import com.jacob.activeX.*;
class sa_dispatch
{
public static void main(String args[])
{
// deprecated
//System.runFinalizersOnExit(true);
try {
String lang = "VBScript";
ActiveXComponent sC = new ActiveXComponent("ScriptControl");
Dispatch sControl = (Dispatch)sC.getObject();
Dispatch.put(sControl, "Language", lang);
Variant result = Dispatch.call(sControl, "Eval", args[0]);
System.out.println("eval("+args[0]+") = "+ result);
// wrap the script control in a variant
Variant v = new Variant(sControl);
// create a safe array of type dispatch
SafeArray sa = new SafeArray(Variant.VariantDispatch, 1);
// put the variant in the array
sa.setVariant(0, v);
// take it back out
Variant v2 = sa.getVariant(0);
Dispatch d = v2.toDispatch();
// make sure you can call eval on it
result = Dispatch.call(d, "Eval", args[0]);
System.out.println("eval("+args[0]+") = "+ result);
} catch (ComException e) {
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,98 @@
package com.jacob.test.safearray;
import com.jacob.com.*;
/**
* SafeArrayTest Program
*
* This is more of an exerciser. It doesn't verify that it gets back
* what it expects like a junit test would
*
*/
class sa_test {
public static void main(String[] args) {
//System.runFinalizersOnExit(true);
SafeArray sa = new SafeArray(Variant.VariantVariant, 3);
sa.fromShortArray(new short[] { 1, 2, 3 });
System.out.println("sa short=" + sa);
int[] ai = sa.toIntArray();
for (int i = 0; i < ai.length; i++) {
System.out.println("toInt=" + ai[i]);
}
double[] ad = sa.toDoubleArray();
for (int i = 0; i < ad.length; i++) {
System.out.println("toDouble=" + ad[i]);
}
sa.fromIntArray(new int[] { 100000, 200000, 300000 });
System.out.println("sa int=" + sa);
ai = sa.toIntArray();
for (int i = 0; i < ai.length; i++) {
System.out.println("toInt=" + ai[i]);
}
ad = sa.toDoubleArray();
for (int i = 0; i < ad.length; i++) {
System.out.println("toDouble=" + ad[i]);
}
Variant av[] = sa.toVariantArray();
for (int i = 0; i < av.length; i++) {
System.out.println("toVariant=" + av[i]);
}
sa.fromDoubleArray(new double[] { 1.5, 2.5, 3.5 });
System.out.println("sa double=" + sa);
sa.fromFloatArray(new float[] { 1.5F, 2.5F, 3.5F });
System.out.println("sa float=" + sa);
sa.fromBooleanArray(new boolean[] { true, false, true, false });
System.out.println("sa bool=" + sa);
av = sa.toVariantArray();
for (int i = 0; i < av.length; i++) {
System.out.println("toVariant=" + av[i]);
}
sa.fromCharArray(new char[] { 'a', 'b', 'c', 'd' });
System.out.println("sa char=" + sa);
sa.fromStringArray(new String[] { "hello", "from", "java", "com" });
System.out.println("sa string=" + sa);
av = sa.toVariantArray();
for (int i = 0; i < av.length; i++) {
System.out.println("toVariant=" + av[i]);
}
sa.fromVariantArray(new Variant[] {
new Variant(1), new Variant(2.3), new Variant("hi") });
System.out.println("sa variant=" + sa);
sa_ND_test();
}
public static void sa_ND_test() {
int[] lowerBounds = new int[] { 0, 0, 0 };
int[] dimensionSizes = new int[] { 3, 3, 3 };
SafeArray sa3x3 = new SafeArray(Variant.VariantVariant, lowerBounds,
dimensionSizes);
System.out.println("Num Dimensions = " + sa3x3.getNumDim());
for (int i = 1; i <= sa3x3.getNumDim(); i++) {
System.out.println("Dimension number = " + i);
System.out.println("Lower bound = " + sa3x3.getLBound(i));
System.out.println("Upper bound = " + sa3x3.getUBound(i));
}
int fill = 0;
int[] indices = new int[] { 0, 0, 0 };
for (int i = 0; i < 3; i++) {
indices[0] = i;
for (int j = 0; j < 3; j++) {
indices[1] = j;
for (int k = 0; k < 3; k++) {
indices[2] = k;
fill = i * 100 + j * 10 + k;
sa3x3.setInt(indices, fill);
System.out.println("sa[" + i + "][" + j + "][" + k + "] = "
+ sa3x3.getInt(indices));
}
}
}
}
}

View File

@@ -0,0 +1,2 @@
java ScriptTest "1+2"
java ScriptTest "()1+2"

View File

@@ -0,0 +1,50 @@
package com.jacob.test.vbscript;
import com.jacob.com.*;
import com.jacob.activeX.*;
/**
* In this case the component is created and used in the same thread
* and it's an Apartment Threaded component, so we call InitSTA.
*/
class ScriptTest
{
public static void main(String args[]) throws Exception
{
ComThread.InitSTA(true);
DispatchEvents de = null;
Dispatch sControl = null;
try {
String lang = "VBScript";
ActiveXComponent sC = new ActiveXComponent("ScriptControl");
sControl = (Dispatch)sC.getObject();
Dispatch.put(sControl, "Language", lang);
ScriptTestErrEvents te = new ScriptTestErrEvents();
de = new DispatchEvents(sControl, te);
if (de == null){
System.out.println("Received null when trying to create new DispatchEvents");
}
Variant result = Dispatch.call(sControl, "Eval", args[0]);
// call it twice to see the objects reused
result = Dispatch.call(sControl, "Eval", args[0]);
// call it 3 times to see the objects reused
result = Dispatch.call(sControl, "Eval", args[0]);
System.out.println("eval("+args[0]+") = "+ result);
} catch (ComException e) {
e.printStackTrace();
}
finally
{
Integer I = null;
for(int i=1;i<1000000;i++)
{
I = new Integer(i);
}
System.out.println(I);
ComThread.Release();
ComThread.quitMainSTA();
}
}
}

View File

@@ -0,0 +1,98 @@
package com.jacob.test.vbscript;
import com.jacob.com.*;
import com.jacob.activeX.*;
/**
* This example demonstrates how to make calls between
* two different STA's.
* First, to create an STA, you need to extend the STA class
* and override its OnInit() method. This method will be called
* in the STA's thread so you can use it to create your COM
* components that will run in that STA.
* If you then try to call methods on those components from other
* threads (STA or MTA) - this will fail.
* You cannot create a component in an STA and call its methods
* from another thread.
* You can use the DispatchProxy to get a proxy to any Dispatch
* that lives in another STA. This object has to be created in the
* STA that houses the Dispatch (in this case it's created in the
* OnInit method). Then, another thread can call the toDispatch()
* method of DispatchProxy to get a local proxy. At most ONE (!)
* thread can call toDispatch(), and the call can be made only once.
* This is because a IStream object is used to pass the proxy, and
* it is only written once and closed when you read it.
* If you need multiple threads to access a Dispatch pointer, then
* create that many DispatchProxy objects.
*/
class ScriptTest2 extends STA
{
public static ActiveXComponent sC;
public static DispatchEvents de = null;
public static Dispatch sControl = null;
public static DispatchProxy sCon = null;
public boolean OnInit()
{
try
{
System.out.println("OnInit");
System.out.println(Thread.currentThread());
String lang = "VBScript";
sC = new ActiveXComponent("ScriptControl");
sControl = (Dispatch)sC.getObject();
// sCon can be called from another thread
sCon = new DispatchProxy(sControl);
Dispatch.put(sControl, "Language", lang);
ScriptTestErrEvents te = new ScriptTestErrEvents();
de = new DispatchEvents(sControl, te);
return true;
}
catch (Exception e)
{
e.printStackTrace();
return false;
}
}
public void OnQuit()
{
System.out.println("OnQuit");
}
public static void main(String args[]) throws Exception
{
try {
ComThread.InitSTA();
ScriptTest2 script = new ScriptTest2();
Thread.sleep(1000);
// get a thread-local Dispatch from sCon
Dispatch sc = sCon.toDispatch();
// call a method on the thread-local Dispatch obtained
// from the DispatchProxy. If you try to make the same
// method call on the sControl object - you will get a
// ComException.
Variant result = Dispatch.call(sc, "Eval", args[0]);
System.out.println("eval("+args[0]+") = "+ result);
script.quit();
System.out.println("called quit");
} catch (ComException e) {
e.printStackTrace();
}
finally
{
Integer I = null;
for(int i=1;i<1000000;i++)
{
I = new Integer(i);
}
System.out.println(I);
ComThread.Release();
}
}
}

View File

@@ -0,0 +1,96 @@
package com.jacob.test.vbscript;
import com.jacob.com.*;
import com.jacob.activeX.*;
/**
* This example demonstrates how to make calls between
* two different STA's.
* First, to create an STA, you need to extend the STA class
* and override its OnInit() method. This method will be called
* in the STA's thread so you can use it to create your COM
* components that will run in that STA.
* If you then try to call methods on those components from other
* threads (STA or MTA) - this will fail.
* You cannot create a component in an STA and call its methods
* from another thread.
* You can use the DispatchProxy to get a proxy to any Dispatch
* that lives in another STA. This object has to be created in the
* STA that houses the Dispatch (in this case it's created in the
* OnInit method). Then, another thread can call the toDispatch()
* method of DispatchProxy to get a local proxy. At most ONE (!)
* thread can call toDispatch(), and the call can be made only once.
* This is because a IStream object is used to pass the proxy, and
* it is only written once and closed when you read it.
* If you need multiple threads to access a Dispatch pointer, then
* create that many DispatchProxy objects.
*/
class ScriptTest2ActiveX extends STA
{
public static ActiveXComponent sC;
public static DispatchEvents de = null;
public static DispatchProxy sCon = null;
public boolean OnInit()
{
try
{
System.out.println("OnInit");
System.out.println(Thread.currentThread());
String lang = "VBScript";
sC = new ActiveXComponent("ScriptControl");
// sCon can be called from another thread
sCon = new DispatchProxy(sC);
sC.setProperty("Language", lang);
ScriptTestErrEvents te = new ScriptTestErrEvents();
de = new DispatchEvents(sC, te);
return true;
}
catch (Exception e)
{
e.printStackTrace();
return false;
}
}
public void OnQuit()
{
System.out.println("OnQuit");
}
public static void main(String args[]) throws Exception
{
try {
ComThread.InitSTA();
ScriptTest2ActiveX script = new ScriptTest2ActiveX();
Thread.sleep(1000);
// get a thread-local Dispatch from sCon
ActiveXComponent sc = new ActiveXComponent(sCon.toDispatch());
// call a method on the thread-local Dispatch obtained
// from the DispatchProxy. If you try to make the same
// method call on the sControl object - you will get a
// ComException.
Variant result = sc.invoke("Eval", args[0]);
System.out.println("eval("+args[0]+") = "+ result);
script.quit();
System.out.println("called quit");
} catch (ComException e) {
e.printStackTrace();
}
finally
{
Integer I = null;
for(int i=1;i<1000000;i++)
{
I = new Integer(i);
}
System.out.println(I);
ComThread.Release();
}
}
}

View File

@@ -0,0 +1,68 @@
package com.jacob.test.vbscript;
import com.jacob.com.*;
import com.jacob.activeX.*;
/**
* Here we create the ScriptControl component in a separate MTA thread
* and then call the Eval method from the main thread. The main thread
* must also be an MTA thread. If you try to create it as an STA
* then you will not be able to make calls into a component running
* in another thread.
*/
class ScriptTest3 extends Thread
{
public static ActiveXComponent sC;
public static DispatchEvents de = null;
public static Dispatch sControl = null;
public static boolean quit = false;
public void run()
{
try
{
ComThread.InitMTA();
System.out.println("OnInit");
String lang = "VBScript";
sC = new ActiveXComponent("ScriptControl");
sControl = (Dispatch)sC.getObject();
Dispatch.put(sControl, "Language", lang);
ScriptTestErrEvents te = new ScriptTestErrEvents();
de = new DispatchEvents(sControl, te);
System.out.println("sControl="+sControl);
while (!quit) sleep(100);
ComThread.Release();
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
System.out.println("worker thread exits");
}
}
public static void main(String args[]) throws Exception
{
try {
ComThread.InitMTA();
ScriptTest3 script = new ScriptTest3();
script.start();
Thread.sleep(1000);
Variant result = Dispatch.call(sControl, "Eval", args[0]);
System.out.println("eval("+args[0]+") = "+ result);
System.out.println("setting quit");
ScriptTest3.quit = true;
} catch (ComException e) {
e.printStackTrace();
}
finally
{
System.out.println("main done");
ComThread.Release();
}
}
}

View File

@@ -0,0 +1,66 @@
package com.jacob.test.vbscript;
import com.jacob.com.*;
import com.jacob.activeX.*;
/**
* Here we create the ScriptControl component in a separate MTA thread
* and then call the Eval method from the main thread. The main thread
* must also be an MTA thread. If you try to create it as an STA
* then you will not be able to make calls into a component running
* in another thread.
*/
class ScriptTest3ActiveX extends Thread
{
public static ActiveXComponent sC;
public static DispatchEvents de = null;
public static boolean quit = false;
public void run()
{
try
{
ComThread.InitMTA();
System.out.println("OnInit");
String lang = "VBScript";
sC = new ActiveXComponent("ScriptControl");
sC.setProperty("Language", lang);
ScriptTestErrEvents te = new ScriptTestErrEvents();
de = new DispatchEvents(sC, te);
System.out.println("sControl="+sC);
while (!quit) sleep(100);
ComThread.Release();
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
System.out.println("worker thread exits");
}
}
public static void main(String args[]) throws Exception
{
try {
ComThread.InitMTA();
ScriptTest3ActiveX script = new ScriptTest3ActiveX();
script.start();
Thread.sleep(1000);
Variant result = sC.invoke("Eval", args[0]);
System.out.println("eval("+args[0]+") = "+ result);
System.out.println("setting quit");
ScriptTest3ActiveX.quit = true;
} catch (ComException e) {
e.printStackTrace();
}
finally
{
System.out.println("main done");
ComThread.Release();
}
}
}

View File

@@ -0,0 +1,49 @@
package com.jacob.test.vbscript;
import com.jacob.com.*;
import com.jacob.activeX.*;
/**
* In this case the component is created and used in the same thread
* and it's an Apartment Threaded component, so we call InitSTA.
*/
class ScriptTestActiveX
{
public static void main(String args[]) throws Exception
{
ComThread.InitSTA(true);
DispatchEvents de = null;
try {
String lang = "VBScript";
ActiveXComponent sC = new ActiveXComponent("ScriptControl");
sC.setProperty("Language",lang);
ScriptTestErrEvents te = new ScriptTestErrEvents();
de = new DispatchEvents(sC, te);
if (de == null){
System.out.println("null returned when trying to create DispatchEvents");
}
Variant result;
result = sC.invoke("Eval",args[0]);
// call it twice to see the objects reused
result = sC.invoke("Eval",args[0]);
// call it 3 times to see the objects reused
result = sC.invoke("Eval",args[0]);
System.out.println("eval("+args[0]+") = "+ result);
} catch (ComException e) {
e.printStackTrace();
}
finally
{
Integer I = null;
for(int i=1;i<1000000;i++)
{
I = new Integer(i);
}
System.out.println(I);
ComThread.Release();
ComThread.quitMainSTA();
}
}
}

View File

@@ -0,0 +1,19 @@
package com.jacob.test.vbscript;
import com.jacob.com.Variant;
/**
* Extracted from ScriptTest so everyone can see this
*/
public class ScriptTestErrEvents {
public void Error(Variant[] args)
{
System.out.println("java callback for error!");
}
public void Timeout(Variant[] args)
{
System.out.println("java callback for error!");
}
}

View File

@@ -0,0 +1,18 @@
package com.jacob.test.vbscript;
import com.jacob.com.*;
import com.jacob.activeX.*;
class speed
{
public static void main(String args[])
{
String lang = "VBScript";
ActiveXComponent sC = new ActiveXComponent("ScriptControl");
Dispatch sControl = sC.getObject();
Dispatch.put(sControl, "Language", lang);
for(int i=0;i<10000;i++) {
Dispatch.call(sControl, "Eval", "1+1");
}
}
}

View File

@@ -0,0 +1,28 @@
package com.jacob.test.windowsmedia;
/**
* partial test program from the sourceforge bug report 1453161
* that says you get a random "can't map name to dispid" when
* getting the URL from the player
*
* I run with options
* -Djava.library.path=d:/jacob/release -Dcom.jacob.autogc=false -Dcom.jacob.debug=true
*/
import com.jacob.activeX.*;
public class WMPlayer {
public static void main(String[] args){
ActiveXComponent wmp = null;
wmp = new ActiveXComponent("WMPlayer.OCX");
// the sourceforge posting didn't post all the code so this is all we have
// we need some other information on how to set the document
// so that we have a url to open
for ( int i= 0 ; i < 1000 ; i++){
System.out.println("the wmp url is "+ wmp.getProperty("URL").toString());
}
}
}