| Previous | Next | |
Windows: Flash 8 or 9 AS2.0 SWF + mProjector
3.0; Windows 98/ME/NT Support: Flash 7 SWF + mProjector
2.0;
Macintosh: Not Applicable
mApplication.registerCOMServer(serverFileName:String) : BooleanserverFileName - Name (including the path) of the COM server to register.
A boolean.; ;
Method; Registers the specified COM server. Once the server is registered, the objects it contains can be created via the mApplication.createObject() function.
The following examplecreates several button functions that exerices a COM object. The registerCOMServer_btn.onPress method registers the COM object.
var beepDLLisRegisted = false;
var beepObject = NULL;
drag_btn.onPress = function () {
mWindow.startDrag();
}
quit_btn.onPress = function () {
mApplication.quit();
}
registerCOMServer_btn.onPress = function () {
beepDLLisRegisted = mApplication.registerCOMServer("ComBeep.dll");
if (beepDLLisRegisted){
mApplication.trace("registerCOMServer beep.dll successfull");
} else {
mApplication.trace("registerCOMServer beep.dll FAILED");
}
}
createBeepObject_btn.onPress = function () {
if (beepDLLisRegisted){
beepObject = mApplication.createObject("ComBeep.ComBeeper");
if (beepObject){
mApplication.trace("createObject beepObject successful");
} else {
mApplication.trace("createObject beepObject FAILED");
}
}
}
beep_btn.onPress = function () {
if (beepObject){
mApplication.trace("beepObject.beep(4000,20)");
beepObject.beep(4000,20);
}
}
destroyBeepObject_btn.onPress = function () {
if (beepObject){
beepObject.deleteObject();
beepObject = NULL;
}
}
Windows COM Basics, Windows COM MS Access Database
| Questions or Feedback? | Previous | Next |