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...
That's the spirit ArkM - you are absolutely right. Here is my code.
This is my Lib header:
#include <string>
using namespace std;
namespace JCppLib
{
class JLib
{
public:
static string jReplace(string&, string const&, string const&);
};
}
This is my lib source:
#include...
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'
Hi,
I', kind of new to Fortran, so I've probably missed 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...
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...
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.