473,322 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Calling a DLL using Javascript?

Hi All,

I know that this is not right forum to address this issue, i had posted
this problem in Javascript forum but of no use, i appreciate if any
one of you can answer or point me to some useful guide.
I tried my hand in google and googlegroups(dejanews) but of no benefit.

I am not able to access a dll function from a remote script using
ActiveXobject when
an output parameter is used, but i could able to access the same when no
output parameter
is used.

While calling a DLL function from my javascript app i am passing 3
parameters
(2 input parameters and 1 output parameter).
The output parameter basically stores the return value which then will be
used
in my Javascript app.
Pl note that in my IDL file i changed the return type of output parameter to
[out, retval].

Here is my Javascript file.

fun1(id,password)
{
var AutherizedUser;
var ValidateObject = new ActiveXobject("InstallDLL.Install");
ValidateObject.ValidateUser(id,password,Autherized User);
return AutherizedUser;
}

DLL

STDMETHODIMP CInstall::ValidateUser(BSTR userId, BSTR pwd, BOOL* pVal)
{
// TODO: Add your implementation code here
LDAP *ldap;

ldap = ldap_open("ldap.xyz.com", LDAP_PORT);

if(ldap == NULL)
{
*pVal = FALSE;
return S_FALSE;
}

ULONG val = ldap_simple_bind_s(ldap, dn, BSTRToChar(pwd));
//pl note that these functions are working properly and no problem with
them.
if (val == LDAP_SUCCESS)
{
*pVal = TRUE;
}
else
{
*pVal = FALSE;
return S_FALSE;
}
return S_OK;
}

I appreciate your help.
Regards
Venkat

Jul 20 '05 #1
0 7054

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: R.G. Vervoort | last post by:
I am using a javafunction (onclick in select) in which i am calling a function in php (thats why i send this to both php and javascript newsgroups). in the onclick i call the function...
18
by: Simula | last post by:
I am developing an HTML javascript application and I want to preserve state in a way that can be book-marked. I chose HTML anchors as a means of preserving state. When the application changes...
5
by: Krishna | last post by:
Hi all, Can i call my javascript functions from the web controls.Any appropriate site which will be tell more on this will be helpfull. Regards.., Krishna
1
by: desmcc | last post by:
Hi, I am launching a modal dialog through the usual javascript (window.showmodaldialog). When the modal dialog is complete (ie user selects OK), the calling page then refreshes itself by setting...
4
by: Martin Feuersteiner | last post by:
Dear Group I'm using VB to write an aspnet application. I would like to call a javascript function from within a VB Sub or VB Function, is it possible? My code is something like this: VB...
3
by: Opa | last post by:
Hi , I have a form with javasript which launches a popup via the showModalDialog() method. I get the dialog to open, now I am trying to first get a reference to the calling form from the popup...
2
by: moni | last post by:
Hi, I wanted to call a javascript function function showAddress(address) { ..... } from the aspx.cs file from the Gridview_RowCommand function
4
by: Nuno | last post by:
Hello, I'm trying to call some web services only using javascript from a html page. I succeeded on doind this in IE with the use of the behavior:url(webservice.htc); (technique founded in the...
47
by: mukeshrasm | last post by:
Hi I am calling two pages using Ajax Get_Pages.php and Get_Content.php from combo box. Both pages are displayed based on selection from combo box. Main problem is that it is not showing the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.