Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
4.6 KiB

  1. Consider
  2. Abandon using IActiveScriptParse in favor of IPersist* (doesn't appear to be an options for VBS).
  3. Do we really need protection from multithreaded access? Am I doing it right?
  4. Am I defining/returning proper errors? What about the facility of errors from WinError.h that I return?
  5. In IDirectMusicScript, etc. pass variants by ref (pointer) instead of value for efficiency?
  6. If a null performance or loader is passed to IDirectMusicScript::Init then just create and initialize one.
  7. Should scripts be able to do all the initialization things traditionally done to prepare for playing?
  8. How do we handle CloseDown? Must be called by engine?
  9. Handle error hr's from calling DirectMusic objects better. Objects set rich error info that we save in exception?
  10. Multiply times by somthing like 1000 due to lost capacity. Similar to VB OM.
  11. Any way to turn off library functions such as Stop?
  12. Use properties. "MasterVolume = 100" instead of "SetMasterVolume(100)".
  13. Automation model
  14. We don't support type info.
  15. We don't support named parameters.
  16. We don't pass parameters by reference.
  17. International
  18. We have no support for scripts with international character sets or locale-dependant programming languages. In fact, we hard code English so that we assure consistent playback of scripts no matter whether they are running on English or on foreign-language OS's.
  19. The script source is read from disk with the ANSI code page.
  20. The script is interpreted/executed with respect to the US English locale.
  21. Scripting Engines
  22. The scripting engine must support the IActiveScriptParse interface.
  23. The scripting engine must change to the Started state immediately -- it cannot return OLESCRIPT_S_PENDING from SetScriptState.
  24. Restrictions for simplicity of script API / DirectMusicScript implementation
  25. Routines take no parameters and don't return values (use global variables instead)
  26. VBS
  27. No constant for OLESCRIPT_S_PENDING.
  28. IActiveScript::Close docs inconsistent about return if already closed.
  29. Script Event Track
  30. Mutes have no effect on whether script events fire.
  31. Implementing new IDispatch object
  32. New aut*.h from autperformance.h
  33. Replace CAutDirectMusicPerformance with CAutDirectMusic*
  34. Replace BaseImpPerf with BaseImp*
  35. Replace IDirectMusicPerformance with IDirectMusic*
  36. Replace automation methods (Delete GetIDs/Invoke overrides, delete or replace helpers)
  37. New aut*.cpp from autperformance.cpp
  38. #include "autperformance.h" -> "aut*.h", remove unnecessary includes
  39. Replace BaseImpPerf with BaseImp*
  40. Replace CAutDirectMusicPerformance with CAutDirectMusic*
  41. Change ms_wszClassName to the name of your object instead of "Performance"
  42. Replace method info
  43. Replace P in DMPDISP_* IDs with your own letter or couple of letters (DMLDISP_* for loader)
  44. Delete from private functions section onward
  45. Implement automation methods
  46. COM hookup
  47. define new guid in dmscriptautguids.h
  48. dll.cpp: #include "aut*.h", define g_szDMScript*FriendlyName etc
  49. dll.cpp: DllGetClassObject, DLLUnregisterServer, DLLRegisterServer
  50. Adding aggregated IDispatch to main objects
  51. place #include "dmscriptautguids.h" in initguid file and in object .cpp file
  52. Add IUnknown pointer for controlling unknown to object decl, init to NULL in constructor
  53. Add IID_IDispatch to query interface
  54. See an example such as performance.
  55. Be sure it returns NULL if it fails. (Change structure of if to clear *ppv at top and return E_NOTIMPL if still null instead of else.)
  56. Be sure to change performance type/GUID.
  57. Release on destruction, protect destruction with artificially increased ref count (read release and destruction code to make sure this works right with the object)
  58. Simple test
  59. Place breakpoint in a method and run into it
  60. Place breakpoint in real object's destructor and quit
  61. Step into release of Aut object to ensure it is destroyed as well
  62. Making a new track
  63. Add new CLSID to dmusici.h
  64. Create header from track.h
  65. Replace CDirectMusicScriptTrack
  66. Change EventInfo to contain the appropriate stuff
  67. Create source from track.cpp
  68. Replace CDirectMusicScriptTrack
  69. Eliminate or modify begin a tool and posting back to self
  70. IDirectMusicTool interface
  71. DMUS_PMSG_ScriptTrack structure
  72. Load ...
  73. Make new error to replace DMUS_E_INVALID_SCRIPTTRACK.
  74. InitPlay ...
  75. EndPlay ...
  76. Clone
  77. COM goo (ugh!)
  78. Duplicate class factory in dmprfdll.cpp and dmprfdll.h. Change new statement if necessary.
  79. #include track header in dmprfdll.cpp
  80. Add case to DllGetClassObject
  81. Add case to DllUnregisterServer and DllRegisterServer
  82. Segment trigger track
  83. SetParam (such as GUID_Download) with index 0 won't work. Only goes to band or trigger track
  84. but not both. Must use DMUS_SEG_ALLTRACKS with trigger track.