View previous topic :: View next topic |
Author |
Message |
tjohnson
Joined: 20 Aug 2006 Posts: 8
|
Posted: Fri Nov 24, 2006 12:33 am Post subject: Problems getting the ScriptTest.D example working |
|
|
Thanks for Juno.
First, The FSO example should use createCo instead of createInstance.
see http://www.dsource.org/projects/juno/wiki/TypeLibraryImporterTips
Second, why am I getting a Stack Overflow error when I run the exe? See the bottom of the post for details.
Tom Johnson
D:\ddevl\dado>implib shlwapi.lib shlwapi.dll
Digital Mars Import Library Manager Version 7.5B4n
Copyright (C) Digital Mars 1999-2002. All Rights Reserved.
Modified by Jan Knepper
shlwapi.lib
Input is a Windows NT DLL file 'SHLWAPI.dll'.
Output is a Windows NT import library.
Digital Mars Import Library Creator complete.
D:\ddevl\dado>bud -v -clean scripttest.d -Ic:\dmd\import
parse scripttest
parse core
parse core
parse meta
parse string
parse constants
parse core
parse win32
parse registry
parse environment
parse format
parse math
parse scripting
semantic scripttest
semantic core
semantic core
semantic meta
semantic string
semantic constants
semantic core
semantic win32
semantic registry
semantic environment
semantic format
semantic math
semantic scripting
semantic2 scripttest
semantic2 core
semantic2 core
semantic2 meta
semantic2 string
semantic2 constants
semantic2 core
semantic2 win32
semantic2 registry
semantic2 environment
semantic2 format
semantic2 math
semantic2 scripting
semantic3 scripttest
semantic3 core
semantic3 core
semantic3 meta
semantic3 string
semantic3 constants
semantic3 core
semantic3 win32
semantic3 registry
semantic3 environment
semantic3 format
semantic3 math
semantic3 scripting
code scripttest
generating code for function 'main'
generating code for function 'coCreate'
code core
generating code for function '_staticCtor'
generating code for function '_staticDtor'
generating code for function 'opCall'
generating code for function 'parse'
generating code for function 'hexToInt'
generating code for function 'opCall'
generating code for function 'newGuid'
generating code for function 'fromProgID'
generating code for function 'opEquals'
generating code for function 'toString'
generating code for function 'hexToString'
generating code for function 'hexToChar'
generating code for function 'toHash'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'clear'
generating code for function 'copyTo'
generating code for function 'toString'
generating code for function 'startupCOM'
generating code for function 'shutdownCOM'
generating code for function 'SUCCEEDED'
generating code for function 'FAILED'
generating code for function 'this'
generating code for function 'this'
generating code for function 'this'
generating code for function 'errorCode'
generating code for function 'getErrorMessage'
generating code for function 'tryRelease'
generating code for function 'releaseAfter'
generating code for function 'clearAfter'
generating code for function 'utf8ToBstr'
generating code for function 'bstrToUtf8'
generating code for function 'bstrLength'
generating code for function 'freeBstr'
generating code for function 'com_cast_impl'
code core
generating code for function 'opCall'
generating code for function 'major'
generating code for function 'minor'
generating code for function 'build'
generating code for function 'revision'
generating code for function 'cloneObject'
generating code for function 'this'
generating code for function 'toString'
generating code for function 'message'
generating code for function 'this'
generating code for function 'this'
generating code for function 'message'
generating code for function 'paramName'
generating code for function 'this'
generating code for function 'this'
generating code for function 'this'
generating code for function 'this'
generating code for function 'this'
generating code for function 'this'
generating code for function 'this'
generating code for function 'this'
generating code for function 'this'
generating code for function 'this'
generating code for function 'this'
code meta
code string
generating code for function 'wcslen'
generating code for function 'strlen'
generating code for function 'toLPStr'
generating code for function 'toUtf8'
generating code for function 'toString'
generating code for function 'getHash'
generating code for function 'equals'
generating code for function 'compare'
generating code for function 'tsize'
generating code for function 'getHash'
generating code for function 'compare'
generating code for function 'compare'
generating code for function 'compare'
generating code for function 'equals'
generating code for function 'equals'
generating code for function 'indexOf'
generating code for function 'indexOf'
generating code for function 'indexOf'
generating code for function 'indexOf'
generating code for function 'lastIndexOf'
generating code for function 'lastIndexOf'
generating code for function 'lastIndexOf'
generating code for function 'lastIndexOf'
generating code for function 'startsWith'
generating code for function 'startsWith'
generating code for function 'endsWith'
generating code for function 'endsWith'
generating code for function 'toLower'
generating code for function 'toLowerInvariant'
generating code for function 'toUpper'
generating code for function 'toUpperInvariant'
generating code for function 'replace'
generating code for function 'replace'
generating code for function 'trim'
generating code for function 'trimStart'
generating code for function 'trimEnd'
generating code for function 'trimHelper'
generating code for function 'padLeft'
generating code for function 'padRight'
generating code for function 'split'
generating code for function 'createSeparatorList'
generating code for function 'join'
generating code for function 'isWhiteSpace'
generating code for function 'opCall'
generating code for function 'getType'
generating code for function 'getTypeCode'
generating code for function 'getValue'
generating code for function 'toString'
generating code for function 'opCall'
generating code for function 'opIndex'
generating code for function 'count'
generating code for function 'format'
generating code for function 'formatError'
generating code for function 'format'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'va_arg'
code constants
code core
generating code for function '_staticDtor'
generating code for function 'initNameMapping'
generating code for function 'enumSystemLocales'
generating code for function 'enumLocalesProc'
generating code for function 'getCultureName'
generating code for function 'findCultureFromId'
generating code for function 'findCultureFromName'
generating code for function '__foreachbody1'
generating code for function 'initRegionMapping'
generating code for function 'enumSystemLocales'
generating code for function 'enumLocalesProc'
generating code for function 'findCultureFromRegionName'
generating code for function '__foreachbody2'
generating code for function '__foreachbody3'
generating code for function 'getLocaleInfo'
generating code for function 'getLocaleInfoI'
generating code for function 'getGeoInfo'
generating code for function 'getCalendarInfo'
generating code for function 'getCalendarInfoI'
generating code for function 'getNativeDigits'
generating code for function 'getGrouping'
generating code for function 'convertGroupString'
generating code for function 'enumCalendarInfo'
generating code for function 'enumCalendarsProc'
generating code for function 'getOptionalCalendars'
generating code for function 'enumCalendarsProc'
generating code for function 'enumDateFormats'
generating code for function 'enumDateFormatsProc'
generating code for function 'getShortTime'
generating code for function 'getShortDates'
generating code for function 'getLongDates'
generating code for function 'getYearMonths'
generating code for function 'isNeutralCulture'
generating code for function 'getSpecificCulture'
generating code for function 'toUTF16Nls'
generating code for function '_staticCtor'
generating code for function '_staticDtor'
generating code for function 'this'
generating code for function 'this'
generating code for function 'toString'
generating code for function 'getFormat'
generating code for function 'clone'
generating code for function 'specificCulture'
generating code for function 'getCulture'
generating code for function 'getCulture'
generating code for function 'getCultureWorker'
generating code for function 'toLower'
generating code for function 'getCultures'
generating code for function '__foreachbody4'
generating code for function 'currentCulture'
generating code for function 'currentCulture'
generating code for function 'currentUICulture'
generating code for function 'currentUICulture'
generating code for function 'invariantCulture'
generating code for function 'parent'
generating code for function 'name'
generating code for function 'lcid'
generating code for function 'displayName'
generating code for function 'nativeName'
generating code for function 'englishName'
generating code for function 'languageName'
generating code for function 'isReadOnly'
generating code for function 'isNeutral'
generating code for function 'collation'
generating code for function 'numberFormat'
generating code for function 'numberFormat'
generating code for function 'dateTimeFormat'
generating code for function 'dateTimeFormat'
generating code for function 'calendar'
generating code for function 'listSeparator'
generating code for function 'listSeparator'
generating code for function 'initUserDefaultCulture'
generating code for function 'initUserDefaultUICulture'
generating code for function 'getCalendarInstance'
generating code for function 'checkNeutral'
generating code for function 'checkReadOnly'
generating code for function 'userDefaultCulture'
generating code for function 'userDefaultUICulture'
generating code for function '_staticDtor'
generating code for function 'this'
generating code for function 'this'
generating code for function 'currentRegion'
generating code for function 'geoId'
generating code for function 'name'
generating code for function 'nativeName'
generating code for function 'displayName'
generating code for function 'englishName'
generating code for function 'officialName'
generating code for function 'isoRegionName'
generating code for function 'isMetric'
generating code for function 'currencySymbol'
generating code for function 'isoCurrencySymbol'
generating code for function 'currencyNativeName'
generating code for function 'currencyEnglishName'
generating code for function 'latitude'
generating code for function 'longitude'
generating code for function '_staticDtor'
generating code for function 'getCollation'
generating code for function 'getCollation'
generating code for function 'compare'
generating code for function 'compare'
generating code for function 'compare'
generating code for function 'indexOf'
generating code for function 'indexOf'
generating code for function 'indexOf'
generating code for function 'lastIndexOf'
generating code for function 'lastIndexOf'
generating code for function 'lastIndexOf'
generating code for function 'isPrefix'
generating code for function 'isSuffix'
generating code for function 'toLower'
generating code for function 'toUpper'
generating code for function 'lcid'
generating code for function 'name'
generating code for function 'this'
generating code for function 'getSortingId'
generating code for function 'isPrefix'
generating code for function 'isSuffix'
generating code for function 'getCompareFlags'
generating code for function 'compareString'
generating code for function 'changeCaseString'
generating code for function 'this'
generating code for function 'clone'
generating code for function 'getFormat'
generating code for function 'getInstance'
generating code for function 'currentFormat'
generating code for function 'invariantFormat'
generating code for function 'isReadOnly'
generating code for function 'numberGroupSizes'
generating code for function 'numberGroupSizes'
generating code for function 'currencyGroupSizes'
generating code for function 'currencyGroupSizes'
generating code for function 'percentGroupSizes'
generating code for function 'percentGroupSizes'
generating code for function 'positiveSign'
generating code for function 'positionSign'
generating code for function 'negativeSign'
generating code for function 'negativeSign'
generating code for function 'numberDecimalSeparator'
generating code for function 'numberDecimalSeparator'
generating code for function 'currencyDecimalSeparator'
generating code for function 'currencyDecimalSeparator'
generating code for function 'percentDecimalSeparator'
generating code for function 'percentDecimalSeparator'
generating code for function 'numberGroupSeparator'
generating code for function 'numberGroupSeparator'
generating code for function 'currencyGroupSeparator'
generating code for function 'currencyGroupSeparator'
generating code for function 'percentGroupSeparator'
generating code for function 'percentGroupSeparator'
generating code for function 'currencySymbol'
generating code for function 'currencySymbol'
generating code for function 'percentSymbol'
generating code for function 'percentSymbol'
generating code for function 'nanSymbol'
generating code for function 'nanSymbol'
generating code for function 'negativeInfinitySymbol'
generating code for function 'negativeInfinitySymbol'
generating code for function 'positiveInfinitySymbol'
generating code for function 'positiveInfinitySymbol'
generating code for function 'nativeDigits'
generating code for function 'nativeDigits'
generating code for function 'numberDecimalDigits'
generating code for function 'numberDecimalDigits'
generating code for function 'currencyDecimalDigits'
generating code for function 'currencyDecimalDigits'
generating code for function 'percentDecimalDigits'
generating code for function 'percentDecimalDigits'
generating code for function 'numberNegativePattern'
generating code for function 'numberNegativePattern'
generating code for function 'currencyPositivePattern'
generating code for function 'currencyPositivePattern'
generating code for function 'currencyNegativePattern'
generating code for function 'currencyNegativePattern'
generating code for function 'percentPositivePattern'
generating code for function 'percentPositivePattern'
generating code for function 'percentNegativePattern'
generating code for function 'percentNegativePattern'
generating code for function 'digitSubstitution'
generating code for function 'digitSubstitution'
generating code for function 'this'
generating code for function 'checkReadOnly'
generating code for function 'this'
generating code for function 'clone'
generating code for function 'getFormat'
generating code for function 'getInstance'
generating code for function 'getDayName'
generating code for function 'getAbbreviatedDayName'
generating code for function 'getMonthName'
generating code for function 'getAbbreviatedMonthName'
generating code for function 'currentFormat'
generating code for function 'invariantFormat'
generating code for function 'isReadOnly'
generating code for function 'calendar'
generating code for function 'calendar'
generating code for function 'calendarName'
generating code for function 'rfc1123Pattern'
generating code for function 'sortableDateTimePattern'
generating code for function 'universalSortableDateTimePattern'
generating code for function 'fullDateTimePattern'
generating code for function 'fullDateTimePattern'
generating code for function 'amDesignator'
generating code for function 'amDesignator'
generating code for function 'pmDesignator'
generating code for function 'pmDesignator'
generating code for function 'firstDayOfWeek'
generating code for function 'firstDayOfWeek'
generating code for function 'calendarWeekRule'
generating code for function 'calendarWeekRule'
generating code for function 'dayNames'
generating code for function 'dayNames'
generating code for function 'abbreviatedDayNames'
generating code for function 'abbreviatedDayNames'
generating code for function 'monthNames'
generating code for function 'monthNames'
generating code for function 'abbreviatedMonthNames'
generating code for function 'abbreviatedMonthNames'
generating code for function 'yearMonthPattern'
generating code for function 'yearMonthPattern'
generating code for function 'timeSeparator'
generating code for function 'timeSeparator'
generating code for function 'dateSeparator'
generating code for function 'dateSeparator'
generating code for function 'shortDatePattern'
generating code for function 'shortDatePattern'
generating code for function 'longDatePattern'
generating code for function 'longDatePattern'
generating code for function 'shortTimePattern'
generating code for function 'shortTimePattern'
generating code for function 'longTimePattern'
generating code for function 'longTimePattern'
generating code for function 'this'
generating code for function 'generalShortTimePattern'
generating code for function 'generalLongTimePattern'
generating code for function 'cultureId'
generating code for function 'getShortDatePattern'
generating code for function 'getLongDatePattern'
generating code for function 'getYearMonthPattern'
generating code for function 'getDayNames'
generating code for function 'getAbbreviatedDayNames'
generating code for function 'getMonthNames'
generating code for function 'getAbbreviatedMonthNames'
generating code for function 'optionalCalendars'
generating code for function 'initializeProperties'
generating code for function 'checkReadOnly'
generating code for function 'clone'
generating code for function 'id'
generating code for function 'getHour'
generating code for function 'getMinute'
generating code for function 'getSecond'
generating code for function 'getMilliseconds'
generating code for function 'getDaysInMonth'
generating code for function 'getDaysInYear'
generating code for function 'getMonthsInYear'
generating code for function 'isLeapYear'
generating code for function 'getDateTime'
generating code for function 'toFourDigitYear'
generating code for function 'twoDigitYearMaximum'
generating code for function 'twoDigitYearMaximum'
generating code for function 'this'
generating code for function 'this'
generating code for function 'id'
generating code for function 'getDayOfYear'
generating code for function 'getDayOfMonth'
generating code for function 'getDayOfWeek'
generating code for function 'getMonth'
generating code for function 'getYear'
generating code for function 'getDaysInYear'
generating code for function 'getDaysInMonth'
generating code for function 'getMonthsInYear'
generating code for function 'isLeapYear'
generating code for function 'getDateTime'
generating code for function 'twoDigitYearMaximum'
generating code for function 'twoDigitYearMaximum'
generating code for function 'getDefaultInstance'
generating code for function 'splitDate'
generating code for function 'extractPart'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'fromMinutes'
generating code for function 'add'
generating code for function 'opApp'
generating code for function 'opAddAssign'
generating code for function 'subtract'
generating code for function 'opSub'
generating code for function 'opSubAssign'
generating code for function 'opEquals'
generating code for function 'opCmp'
generating code for function 'opNeg'
generating code for function 'opPos'
generating code for function 'duration'
generating code for function 'toString'
generating code for function 'intToString'
generating code for function 'days'
generating code for function 'hours'
generating code for function 'minutes'
generating code for function 'seconds'
generating code for function 'milliseconds'
generating code for function 'ticks'
generating code for function 'interval'
generating code for function 'opCmp'
generating code for function '_staticCtor'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opEquals'
generating code for function 'equals'
generating code for function 'opCmp'
generating code for function 'compareTo'
generating code for function 'opAdd'
generating code for function 'opAddAssign'
generating code for function 'opSub'
generating code for function 'opSubAssign'
generating code for function 'toHash'
generating code for function 'add'
generating code for function 'subtract'
generating code for function 'addTicks'
generating code for function 'addMilliseconds'
generating code for function 'addSeconds'
generating code for function 'addMinutes'
generating code for function 'addHours'
generating code for function 'addDays'
generating code for function 'addMonths'
generating code for function 'addYears'
generating code for function 'daysInMonth'
generating code for function 'isLeapYear'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'toString'
generating code for function 'toLocalTime'
generating code for function 'toUtcTime'
generating code for function 'now'
generating code for function 'utcNow'
generating code for function 'today'
generating code for function 'date'
generating code for function 'timeOfDay'
generating code for function 'year'
generating code for function 'month'
generating code for function 'day'
generating code for function 'dayOfYear'
generating code for function 'dayOfWeek'
generating code for function 'hour'
generating code for function 'minute'
generating code for function 'second'
generating code for function 'millisecond'
generating code for function 'ticks'
generating code for function 'kind'
generating code for function 'getDateTicks'
generating code for function 'getTimeTicks'
generating code for function 'opCmp'
generating code for function '_staticCtor'
generating code for function 'convertTime'
generating code for function 'convertTimeFromUtc'
generating code for function 'convertTimeToUtc'
generating code for function 'getSystemTimeZones'
generating code for function 'systemTimeZoneById'
generating code for function 'local'
generating code for function 'id'
generating code for function 'standardName'
generating code for function 'daylightName'
generating code for function 'displayName'
generating code for function 'baseUtcOffset'
generating code for function 'this'
generating code for function 'toLocalTime'
generating code for function 'toUniversalTime'
generating code for function 'dateTimeToSystemTime'
generating code for function 'systemTimeToDateTime'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'parse'
code win32
generating code for function 'LANGIDFROMLCID'
generating code for function 'LOBYTE'
generating code for function 'HIBYTE'
generating code for function 'this'
generating code for function 'this'
generating code for function 'this'
generating code for function 'errorCode'
generating code for function 'createErrorMessage'
generating code for function 'this'
generating code for function 'this'
generating code for function 'functionAddress'
generating code for function 'functionAddress'
generating code for function 'functionAddress'
generating code for function 'functionAddress'
generating code for function 'functionAddress'
code registry
generating code for function '_staticCtor'
generating code for function '_dtor'
generating code for function 'close'
generating code for function 'openSubKey'
generating code for function 'deleteSubKey'
generating code for function 'deleteSubKeyTree'
generating code for function 'getStringValue'
generating code for function 'getExpandStringValue'
generating code for function 'getMultiStringValue'
generating code for function 'getBinaryValue'
generating code for function 'getIntValue'
generating code for function 'getLongValue'
generating code for function 'setStringValue'
generating code for function 'setExpandStringValue'
generating code for function 'setIntValue'
generating code for function 'setLongValue'
generating code for function 'setBinaryValue'
generating code for function 'deleteValue'
generating code for function 'toString'
generating code for function 'name'
generating code for function 'subKeyCount'
generating code for function 'subKeyNames'
generating code for function 'valueCount'
generating code for function 'valueNames'
generating code for function 'this'
generating code for function 'getAccess'
generating code for function 'getRootKey'
code environment
generating code for function 'expandEnvironmentVariables'
generating code for function 'getEnvironmentVariable'
generating code for function 'setEnvironmentVariable'
code format
generating code for function 'uintToString'
generating code for function 'intToString'
generating code for function 'intToHexString'
generating code for function 'ulongToString'
generating code for function 'longToString'
generating code for function 'longToHexString'
generating code for function 'parseFormatSpecifier'
generating code for function 'formatUInt'
generating code for function 'formatInt'
generating code for function 'formatULong'
generating code for function 'formatLong'
generating code for function 'formatFloat'
generating code for function 'convertToFloat'
generating code for function 'formatDouble'
generating code for function 'parseUInt'
generating code for function 'parseInt'
generating code for function 'parseULong'
generating code for function 'parseLong'
generating code for function 'parseFloat'
generating code for function 'parseDouble'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'round'
generating code for function 'fromString'
generating code for function 'toLong'
generating code for function 'toDouble'
generating code for function 'getDigits'
generating code for function 'mult64'
generating code for function 'mult64L'
generating code for function 'toString'
generating code for function 'toStringFormat'
generating code for function 'formatGeneral'
generating code for function 'formatNumber'
generating code for function 'formatPercent'
generating code for function 'formatScientific'
generating code for function 'formatCurrency'
generating code for function 'formatFixed'
generating code for function 'formatExponent'
generating code for function 'parseNumber'
generating code for function 'consume'
generating code for function 'isWhitespace'
generating code for function 'formatDateTime'
generating code for function 'expandKnownFormat'
generating code for function 'parseRepeat'
generating code for function 'parseQuote'
generating code for function 'parseNext'
generating code for function 'formatDayOfWeek'
generating code for function 'formatMonth'
generating code for function 'formatDigits'
code math
generating code for function 'ceiling'
generating code for function 'IEEEremainder'
generating code for function 'bitsToDouble'
generating code for function 'isNaN'
generating code for function 'isNaN'
generating code for function 'isInfinity'
generating code for function 'isInfinity'
generating code for function 'random'
generating code for function 'this'
generating code for function 'this'
generating code for function 'next'
generating code for function 'next'
generating code for function 'next'
generating code for function 'nextDouble'
generating code for function 'sample'
generating code for function 'abs'
code scripting
generating code for function 'coCreate'
D:\ddevl\dado>dir
Volume in drive D is DATA
Volume Serial Number is 9C18-2B63
Directory of D:\ddevl\dado
11/24/2006 01:25 AM <DIR> .
11/24/2006 01:25 AM <DIR> ..
11/23/2006 10:50 PM 49,453 adodb.d
11/24/2006 12:08 AM 44 buildit.bat
11/24/2006 01:21 AM <DIR> converted
11/24/2006 01:20 AM 28,947 out.txt
11/24/2006 12:06 AM 10,558 scripting.d
11/24/2006 12:15 AM 699 scripttest.d
11/24/2006 01:25 AM 193,564 scripttest.exe
08/04/2004 07:00 AM 151,552 scrrun.dll
11/24/2006 12:27 AM 98 shlwapi.def
09/14/2006 03:39 AM 474,112 shlwapi.dll
11/24/2006 01:25 AM 36,352 SHLWAPI.LIB
10 File(s) 945,379 bytes
3 Dir(s) 3,912,511,488 bytes free
D:\ddevl\dado>scripttest.exe
Error: Stack Overflow |
|
Back to top |
|
|
John
Joined: 17 Jan 2006 Posts: 75
|
Posted: Fri Nov 24, 2006 3:01 am Post subject: |
|
|
Quote: | First, The FSO example should use createCo instead of createInstance. |
coCreate, rather. I'll fix the example. It was written for an earlier version of the library.
Quote: | Second, why am I getting a Stack Overflow error when I run the exe? |
I couldn't reproduce the stack overflow. I just compiled the example code (with the above change) and it ran OK. |
|
Back to top |
|
|
tjohnson
Joined: 20 Aug 2006 Posts: 8
|
Posted: Fri Nov 24, 2006 12:12 pm Post subject: Do I want to create the TLB for msscript.ocx or scrrun.dll? |
|
|
Thanks for the quick response.
When I ran tlbimpd.exe {0E59F1D2-1FBE-11D0-8FF2-00A0D10038BC} I get a file titled msscriptcontrol.d. I looked this GUID up in the registry and it points to msscript.ocx. This doesn't appear to create the correct module.
Searching my drive I found scrrun.dll in C:\windows\system32 which I copied to a clean subdirectory and ran tlbimpd on it ... which created scripting.d.
The scrrun.dll version is 5.6.0.88.20
The example mentions the tlbimpd.exe {0E59F1D2-1FBE-11D0-8FF2-00A0D10038BC} ... but that is generated from msscript.ocx. Sorry to be dense but what piece of the puzzle am I missing here?
Thanks,
Tom Johnson |
|
Back to top |
|
|
tjohnson
Joined: 20 Aug 2006 Posts: 8
|
Posted: Fri Nov 24, 2006 12:14 pm Post subject: |
|
|
Oh yea, I'm using DMD 0.174.
Tom |
|
Back to top |
|
|
John
Joined: 17 Jan 2006 Posts: 75
|
Posted: Fri Nov 24, 2006 6:00 pm Post subject: |
|
|
I didn't write the example, so I haven't looked at it in depth. But the way it's presented, it is a little confusing - msscript.ocx has nothing to do with the scripting runtime (scrrun.dll).
So to generate scripting.d, the correct command would be:
You don't need msscriptcontrol.d at all. Does this help?
I'll write an official examples page over the weekend.
John. |
|
Back to top |
|
|
John
Joined: 17 Jan 2006 Posts: 75
|
Posted: Fri Nov 24, 2006 6:12 pm Post subject: |
|
|
Quote: | I found scrrun.dll in C:\windows\system32 which I copied to a clean subdirectory |
When Windows tries to load a DLL (or EXE or anything else) it automatically looks in the Windows directory, the System32 directory, the directory local to the program, and anything in your PATH variable. You can also use full path names:
Code: | tlbimpd C:\Windows\System32\scrrun.dll |
That way you won't need to copy DLLs around. |
|
Back to top |
|
|
tjohnson
Joined: 20 Aug 2006 Posts: 8
|
Posted: Sat Nov 25, 2006 9:41 pm Post subject: I will reluctantly try the iTunes example |
|
|
I made a copy of the DLL just for debugging purposes. My usual experience with COM objects is that only the version that is pointed to in the registry really matters.
I'm still having problems with the stack overflow so I'm contemplating downloading the Itunes and stepping through your example. No one asked but my opinon is that the example should be for an application that is already on everyone's computer. I don't want no stink'in iTunes on my development laptop.
My best suggestion is automating windows recorder to play the Tada wav file. Ideally the example would have as few dependencies as possible so that someone new to Juno (like myself) would be able to get at least something working.
Tom J |
|
Back to top |
|
|
tjohnson
Joined: 20 Aug 2006 Posts: 8
|
Posted: Sat Nov 25, 2006 10:40 pm Post subject: Making progress |
|
|
I found the example at http://www.paperocean.org/d/comtest.zip and got it to compile and run.
The tlbimpd at that location (http://www.paperocean.org/d/tlbimpd.zip) is 500K vs 300K so I'm trying out this version of the utility. They both report version 1.0 ... so maybe the difference is debug symbols.
Other examples I've found keep reporting that module com cannot read file com.d. I do have the juno 2 files located at c:\dmd\import\juno so this puzzles me.
D:\ddevl\dado\try3>bud -v -clean scripttest.d -Ic:\dmd\import
parse scripttest
parse core
parse core
parse meta
parse string
parse constants
parse core
parse win32
parse registry
parse environment
parse format
parse math
parse scripting
semantic scripttest
scripting.d(3): module com cannot read file 'com.d'
D:\ddevl\dado\try3>cat scripttest.d
'cat' is not recognized as an internal or external command,
operable program or batch file.
D:\ddevl\dado\try3>type scripttest.d
import std.stdio : writef, writefln;
import juno.com.core : utf8ToBstr;
import scripting;
/* scripting.d was generated by running a patched version of tlbimpd on
Microsoft Scripting Runtime (scrrun.dll) */
void main()
{
//IFileSystem3 objFSO = FileSystemObject.createInstance!(IFileSystem3);
IFileSystem3 objFSO = FileSystemObject.coCreate!(IFileSystem3);
ITextStream objOutFile;
short Short2;
int Int2;
Int2 = objFSO.CreateTextFile(
utf8ToBstr("test_scripting.txt"),
IOMode.ForWriting,
Short2,
objOutFile);
objOutFile.WriteLine(utf8ToBstr("testing 1, 2, 3..."));
objOutFile.Close();
writefln("Test succeeded");
}
D:\ddevl\dado\try3>
Here is the file comparison (TRY2 is generated by 300K tlbimpd):
D:\ddevl\dado\try3>fc scripting.d ..\try2\scripting.d
Comparing files scripting.d and ..\TRY2\SCRIPTING.D
***** scripting.d
private import com;
***** ..\TRY2\SCRIPTING.D
private import juno.com.core;
*****
***** scripting.d
enum Tristate {
TristateTrue = -1,
TristateFalse = 0x00000000,
TristateUseDefault = -2,
TristateMixed = -2,
}
***** ..\TRY2\SCRIPTING.D
enum Tristate {
TristateTrue = 0xFFFFFFFF,
TristateFalse = 0x00000000,
TristateUseDefault = 0xFFFFFFFE,
TristateMixed = 0xFFFFFFFE,
}
*****
***** scripting.d
static GUID IID = { 0x42c642c1, 0x97e1, 0x11cf, 0x97, 0x8f, 0x00, 0xa0, 0x24,
0x63, 0xe0, 0x6f };
int setref_Item(in VARIANT* value, in VARIANT* pRetItem);
int set_Item(in VARIANT* value, in VARIANT* pRetItem);
int get_Item(in VARIANT* Key, out VARIANT pRetItem);
***** ..\TRY2\SCRIPTING.D
static GUID IID = { 0x42c642c1, 0x97e1, 0x11cf, 0x97, 0x8f, 0x00, 0xa0, 0x24,
0x63, 0xe0, 0x6f };
int setref_Item(in VARIANT* Key, in VARIANT* pRetItem);
int set_Item(in VARIANT* Key, in VARIANT* pRetItem);
int get_Item(in VARIANT* Key, out VARIANT pRetItem);
*****
***** scripting.d
int Items(out VARIANT pItemsArray);
int set_Key(in VARIANT* value, in VARIANT* );
int Keys(out VARIANT pKeysArray);
***** ..\TRY2\SCRIPTING.D
int Items(out VARIANT pItemsArray);
int set_Key(in VARIANT* Key, in VARIANT* value);
int Keys(out VARIANT pKeysArray);
*****
***** scripting.d
int RemoveAll();
int set_CompareMode(in CompareMethod value);
int get_CompareMode(out CompareMethod pcomp);
***** ..\TRY2\SCRIPTING.D
int RemoveAll();
int set_CompareMode(in CompareMethod pcomp);
int get_CompareMode(out CompareMethod pcomp);
*****
***** scripting.d
int get_VolumeName(out wchar* pbstrName);
int set_VolumeName(in wchar* value);
int get_FileSystem(out wchar* pbstrFileSystem);
***** ..\TRY2\SCRIPTING.D
int get_VolumeName(out wchar* pbstrName);
int set_VolumeName(in wchar* pbstrName);
int get_FileSystem(out wchar* pbstrFileSystem);
*****
***** scripting.d
int get_Name(out wchar* pbstrName);
int set_Name(in wchar* value);
int get_ShortPath(out wchar* pbstrPath);
***** ..\TRY2\SCRIPTING.D
int get_Name(out wchar* pbstrName);
int set_Name(in wchar* pbstrName);
int get_ShortPath(out wchar* pbstrPath);
*****
***** scripting.d
int get_Attributes(out FileAttribute pfa);
int set_Attributes(in FileAttribute value);
int get_DateCreated(out double pdate);
***** ..\TRY2\SCRIPTING.D
int get_Attributes(out FileAttribute pfa);
int set_Attributes(in FileAttribute pfa);
int get_DateCreated(out double pdate);
*****
***** scripting.d
int get_Name(out wchar* pbstrName);
int set_Name(in wchar* value);
int get_ShortPath(out wchar* pbstrPath);
***** ..\TRY2\SCRIPTING.D
int get_Name(out wchar* pbstrName);
int set_Name(in wchar* pbstrName);
int get_ShortPath(out wchar* pbstrPath);
*****
***** scripting.d
int get_Attributes(out FileAttribute pfa);
int set_Attributes(in FileAttribute value);
int get_DateCreated(out double pdate);
***** ..\TRY2\SCRIPTING.D
int get_Attributes(out FileAttribute pfa);
int set_Attributes(in FileAttribute pfa);
int get_DateCreated(out double pdate);
*****
***** scripting.d
static GUID CLSID = { 0xee09b103, 0x97e0, 0x11cf, 0x97, 0x8f, 0x00, 0xa0, 0x24
, 0x63, 0xe0, 0x6f };
mixin CoClassInterfaces!(IDictionary);
}
***** ..\TRY2\SCRIPTING.D
static GUID CLSID = { 0xee09b103, 0x97e0, 0x11cf, 0x97, 0x8f, 0x00, 0xa0, 0x24
, 0x63, 0xe0, 0x6f };
mixin CoInterfaces!(IDictionary);
}
*****
***** scripting.d
static GUID CLSID = { 0x0d43fe01, 0xf093, 0x11cf, 0x89, 0x40, 0x00, 0xa0, 0xc9
, 0x05, 0x42, 0x28 };
mixin CoClassInterfaces!(IFileSystem3);
}
***** ..\TRY2\SCRIPTING.D
static GUID CLSID = { 0x0d43fe01, 0xf093, 0x11cf, 0x89, 0x40, 0x00, 0xa0, 0xc9
, 0x05, 0x42, 0x28 };
mixin CoInterfaces!(IFileSystem3);
}
*****
***** scripting.d
static GUID CLSID = { 0xc7c3f5b1, 0x88a3, 0x11d0, 0xab, 0xcb, 0x00, 0xa0, 0xc9
, 0x0f, 0xff, 0xc0 };
mixin CoClassInterfaces!(IDrive);
}
***** ..\TRY2\SCRIPTING.D
static GUID CLSID = { 0xc7c3f5b1, 0x88a3, 0x11d0, 0xab, 0xcb, 0x00, 0xa0, 0xc9
, 0x0f, 0xff, 0xc0 };
mixin CoInterfaces!(IDrive);
}
*****
***** scripting.d
static GUID CLSID = { 0xc7c3f5b2, 0x88a3, 0x11d0, 0xab, 0xcb, 0x00, 0xa0, 0xc9
, 0x0f, 0xff, 0xc0 };
mixin CoClassInterfaces!(IDriveCollection);
}
***** ..\TRY2\SCRIPTING.D
static GUID CLSID = { 0xc7c3f5b2, 0x88a3, 0x11d0, 0xab, 0xcb, 0x00, 0xa0, 0xc9
, 0x0f, 0xff, 0xc0 };
mixin CoInterfaces!(IDriveCollection);
}
*****
***** scripting.d
static GUID CLSID = { 0xc7c3f5b3, 0x88a3, 0x11d0, 0xab, 0xcb, 0x00, 0xa0, 0xc9
, 0x0f, 0xff, 0xc0 };
mixin CoClassInterfaces!(IFolder);
}
***** ..\TRY2\SCRIPTING.D
static GUID CLSID = { 0xc7c3f5b3, 0x88a3, 0x11d0, 0xab, 0xcb, 0x00, 0xa0, 0xc9
, 0x0f, 0xff, 0xc0 };
mixin CoInterfaces!(IFolder);
}
*****
***** scripting.d
static GUID CLSID = { 0xc7c3f5b4, 0x88a3, 0x11d0, 0xab, 0xcb, 0x00, 0xa0, 0xc9
, 0x0f, 0xff, 0xc0 };
mixin CoClassInterfaces!(IFolderCollection);
}
***** ..\TRY2\SCRIPTING.D
static GUID CLSID = { 0xc7c3f5b4, 0x88a3, 0x11d0, 0xab, 0xcb, 0x00, 0xa0, 0xc9
, 0x0f, 0xff, 0xc0 };
mixin CoInterfaces!(IFolderCollection);
}
*****
***** scripting.d
static GUID CLSID = { 0xc7c3f5b5, 0x88a3, 0x11d0, 0xab, 0xcb, 0x00, 0xa0, 0xc9
, 0x0f, 0xff, 0xc0 };
mixin CoClassInterfaces!(IFile);
}
***** ..\TRY2\SCRIPTING.D
static GUID CLSID = { 0xc7c3f5b5, 0x88a3, 0x11d0, 0xab, 0xcb, 0x00, 0xa0, 0xc9
, 0x0f, 0xff, 0xc0 };
mixin CoInterfaces!(IFile);
}
*****
***** scripting.d
static GUID CLSID = { 0xc7c3f5b6, 0x88a3, 0x11d0, 0xab, 0xcb, 0x00, 0xa0, 0xc9
, 0x0f, 0xff, 0xc0 };
mixin CoClassInterfaces!(IFileCollection);
}
***** ..\TRY2\SCRIPTING.D
static GUID CLSID = { 0xc7c3f5b6, 0x88a3, 0x11d0, 0xab, 0xcb, 0x00, 0xa0, 0xc9
, 0x0f, 0xff, 0xc0 };
mixin CoInterfaces!(IFileCollection);
}
***** |
|
Back to top |
|
|
John
Joined: 17 Jan 2006 Posts: 75
|
Posted: Sun Nov 26, 2006 5:27 am Post subject: |
|
|
Quote: | I found the example at http://www.paperocean.org/d/comtest.zip and got it to compile and run.
The tlbimpd at that location (http://www.paperocean.org/d/tlbimpd.zip) is 500K vs 300K so I'm trying out this version of the utility. They both report version 1.0 ... so maybe the difference is debug symbols. |
The version at paperocean was a test run for the 0.2 release here. 0.2 contains a number of bug fixes and - in my tests - is far more stable.
Quote: | Other examples I've found keep reporting that module com cannot read file com.d. I do have the juno 2 files located at c:\dmd\import\juno so this puzzles me. |
Sounds like you're using the paperocean version of Tlbimpd and trying to compile the generated files along with Juno. They're not really compatible. Might work if you change all the "com" import statements to "juno.com.core".
Back in September, someone in the newsgroup wanted to know if COM automation was possible with D. I was working on updates to Juno and Tlbimpd at the time, but Juno wasn't yet ready for release. So I compiled Tlbimpd in its then-current state and provided a standalone COM module to help this person get started.
I'd prefer it if people used the 0.2 version, since it's the latest and has far fewer problems. Additionally, I don't have the resources to try to support two different versions. Maybe I should just pull the paperocean stuff from the server?
Quote: | Here is the file comparison |
They're more or less the same. That's not going to be the cause of your stack overflow.
I notice you're using Bud to compile. Do you get the same error without Bud? |
|
Back to top |
|
|
John
Joined: 17 Jan 2006 Posts: 75
|
Posted: Sun Nov 26, 2006 5:34 am Post subject: |
|
|
Quote: | my opinon is that the example should be for an application that is already on everyone's computer |
Quote: | My best suggestion is automating windows recorder to play the Tada wav file |
I'll do that. I was attempting to write a compelling example that would naturally lead to further examples. Clearly iTunes was not as compelling a choice as I had imagined.
Update: sndrec32 doesn't appear to export a type library. I've written a new tutorial that automates the shell.
http://www.dsource.org/projects/juno/wiki/Tutorials/Automation |
|
Back to top |
|
|
tjohnson
Joined: 20 Aug 2006 Posts: 8
|
Posted: Sun Nov 26, 2006 12:19 pm Post subject: |
|
|
Compiling directly (without bud) gives me the same result. Perhaps it is that I'm mixing up the website and the dsource code...but I don't think so since I only searched for the website once I had run into problems with the dsource code/utilities.
Right now I'm thinking it is related to the creation of shlwapi.lib from the .dll file.
I did find the iTunes example compelling...its just that over the years I've learned to be very conservative about what I put on my development laptop. Given your hard work and dedication to the project I should have been a bit more careful with my words as I certainly don't want to give you the impression that your efforts aren't appreciated.
Anyhow, I'll try out your latest example and let you know how it works out.
Best regards,
Tom Johnson |
|
Back to top |
|
|
John
Joined: 17 Jan 2006 Posts: 75
|
Posted: Sun Nov 26, 2006 2:05 pm Post subject: |
|
|
I figured out the reason for the stack overflow. Add the -O switch, and it should run fine.
I'm concerned about why turning off optimisation should lead to a stack overflow, but at least I now know about the issue. |
|
Back to top |
|
|
tjohnson
Joined: 20 Aug 2006 Posts: 8
|
Posted: Sun Nov 26, 2006 3:14 pm Post subject: |
|
|
That fixed it (-O).
Thanks!
Tom J |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|