I should have spotted that myself. You both get appreciation for your persistance. Thx.
ArkM, Can you elaborate on why the function is 'extremely ineffective'? And can you suggest a more efficent approach?
Comming from C# I prefer that the function returns the result, rather than having to pass...
...+ 1;
}
return source;
}
}
This is my test program:
#include <iostream>
#include "stdafx.h"
#include "JCppLib.h"
int _tmain(int argc, _TCHAR* argv[])
{
string ms = "hej med dig";
string s = JCppLib::JLib::jReplace(ms," ","");
cout << ms << endl;
cout << s << endl;
cout <<...
It is almost certainly my lack of understanding the C++ classes/Libraries/Linking that is the cause of the problem here. Anyway, I have not resolved this, but worked around it by simply removing the class from the Lib project. Now it's just a list of functions - and that serves my purpose so...
It should of course have read
C++ is definetly NOT my no. 1 languange !!!
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
Hi xwb,
C++ is definetly my no. 1 language, but I was sure that 'static' meant that you can use the function without creating an instance of the class...?? That seems to work fine on my other functions in the class.
Declaring the function as 'extern' gives the following compiler error - isn't...
Hi,
I've got a function:
string jReplace(string& s, string const& find, string const& replace)
If I place the function in the main file it works as expected.
If I place the function in a static Lib (which contains other functions which works fine in the Lib):
static string...
Hi,
What wouldn't I give for a Int2Str fortran function!
In thread214-1521223 mikrom shows how to make a function which returns a variable length character. The problem is that I do not know the length of the return string until a have 'written' it into a string and trimmed it - and I can do...
thx mikrom, that works for me too.
it this always necessary when calling functions in libraries? - and why is is not necessary for the subroutine?
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
...something completely obvious...
This is my lib code:
real function jMultiply(a,b)
implicit none
real a,b
jMultiply = a*b
end function jMultiply
subroutine sMultiply (a,b,res)
real res,a,b
res = a*b
end
which I have compiled into a...
The answer is here:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/cde42787-982a-478c-b319-e703b270d8ee.mspx?mfr=true
when using the dllhost, the server must run in 'IIS 5.0 isolation mode'.
Sunaj
'The gap between theory and practice is not as wide in theory as it...
I got one step closer. It should be
ComSourceInterfaces(typeof(IFormCloseEvent))
and there is a typo in the above, the prefix should have been "hej_":
Set obj = WScript.CreateObject("DHI.WFScriptWindow","hej_")
The script now subscribes to the event (because OnFormClose!=null), but when the...
Hi,
I need to write a c# dll which I can call from a VBScript.
It works, except that I also need to catch events from the dll.
Here is my C# code
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IFormCloseEvents
{
void OnFormClose();
}...
I know exactly where the error occurs, it's when I create the AxtiveX component.
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
Yes I've tried that and it solves the problem above. However I get a similar error message on an other ActiveX component!
So I would really like to be able to see/debug/monitor extactly where the problem arises...
I've tried FileMon and RegMon, which did not give any additional information...
Well the component works fine (as I also wrote in my first post), it's only when I run it through the webserver that it fails.
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
Unfortunately (as I wrote in my first post) there are no relevant entries in the event logs.
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
I don't know, the component is not in the list of DCOM applications. Should it be? It does not appear in the list on my own XP either, and here it works fine...
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
Hi,
I'm getting "error '8007045a'" when creating an instance of an AxtiveX object on my asp page. The error means that the dll initialisation failed. If I run the exact same code in a VBScript (instead of through the webserver), it works fine. I have given the IWAM and IUSR users permission...
Problem solved. I did not supply the domain, which is mandatory.
You can also hardcode the user into the projectinstaller's constructor:
public ProjectInstaller(){
// This call is required by the Designer.
InitializeComponent();
serviceProcessInstaller1.Account =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.