Calling A C Function From Javascript - Adobe 38040334 - Dreamweaver CS3 User Manual

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Returns
A Boolean value:
JS_TRUE
Example
char *dwConfig = "file:///c|/Program Files/Adobe/Adobe Dreamweaver CS3
/Configuration/Objects";
MM_RemoveConfigFolder(dwConfig);
JSBool MM_DeleteConfigFile()
Availability
Dreamweaver MX.
Description
This function deletes the file, if it exists. If the file exists below the Dreamweaver Configuration folder, the function
marks the file for deletion in the mm_deleted_files.xml file.
If the
argument does not specify a folder in the Dreamweaver Configuration folder, the function deletes the
fileURL
specified file.
Arguments
char *fileURL
• The
argument is a pointer to a string that names the configuration folder to remove, which is
char *fileURL
provided as a file:// URL.
Returns
A Boolean value:
JS_TRUE
Example
char dwConfig = "file:///c:|Program Files/Adobe/Adobe Dreamweaver CS3
/Configuration/Objects/insertbar.xml";
MM_DeleteConfigFile(dwConfig);

Calling a C function from JavaScript

After you understand how C-level extensibility works in Dreamweaver and its dependency on certain data types and
functions, it's useful to know how to build a library and call a function.
The following example requires the following five files, located in the Dreamweaver-application-folder/
Tutorial_assets/Extending folder as archives for both the Macintosh and Windows platforms:
• The mm_jsapi.h header file includes definitions for the data types and functions that are described in "C-level
extensibility and the JavaScript interpreter" on page 347.
• The mm_jsapi_environment.h file defines the MM_Environment.h structure.
• The MMInfo.h file provides access to the Design Notes API.
• The Sample.c example file defines the
indicates success;
JS_FALSE
indicates success;
JS_FALSE
computeSum()
indicates failure.
indicates failure.
function.
DREAMWEAVER CS3
361
Extending Dreamweaver

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents