|
Presuming you're actually using this code to define the singleton:
typedef Loki::SingletonHolder<A> SingleA;
then each module (DLL or EXE) that references A will have its own copy of hte singleton. This is because of how the 'static' keyword works in C++ classes.
If you want one singleton in the whole application, then provide an accessor that's exported from the DLL and declare the singleton in one of the source files in the DLL.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks!I have resolved it by the way as yours.
|
|
|
|
|
Hi! I've been using PeekPocket ( http://www.codeproject.com/KB/mobile/PeekPocket.aspx ) to scan Wifi stations and to get signal strenghts of each one.
It has two custom tabs. I've added a 3rd one, in which I send the lat/long (I've previously calculated) to googlemaps and it would show as a webpage.
The point is that the project is dialogbased and I dont know how to add a WebBrowser control in that 3rd tab.
I've read WebBroser control in Compact .NET ( http://msdn.microsoft.com/en-us/library/ms229657.aspx ) and it needs...
This example requires references to the following namespaces:<br />
<br />
* System<br />
* System.Windows.Forms<br />
If I add that namespaces could I get what I want?
What are the lines to add that namespaces?
Or if you have another idea to show a webpage in that application... )
Thanks in advance!
|
|
|
|
|
I am currently developing a GUI based application using MFC and C++. While I am far from done, I am trying to think a head to the testing phase. I have been told that Winrunner is the de facto standard for testing GUI based applications today. However, I have seen prices on the web for Winrunner in excess of 6000 dollars. That is way out of my budget. I am wondering if somebody could recommend a cheaper (or ever free) tool that is similar to Winrunner.
Thanks
Bob
|
|
|
|
|
Did you try the UWSC[^] tool. I havent used the Winrunner. so am not sure whether this tool will cover all the functionalities of the WinRunner or not.
Home page :http://www.uwsc.info/index.html[^] ( Its japanese )
|
|
|
|
|
nave,
Thanks for the response. I took a quick look at the tool and I am going to take a more in depth look at it. However, I still have a bunch of bugs that I need to fix. At the moment, these bugs are going to take priority over finding new bugs.
Bob
|
|
|
|
|
I am using WinUnit as test tool now, you try it.It's easy to use.
|
|
|
|
|
Hi All,
I'm a pretty experienced programmer but can't figure how to see the value of some variables when in debugger - either Watch Window or the Immediate Window (.NET 2008, C++).
The Watch Window lists them as :Out of Scope. At the least any variable passed into a function is not visible. Example:
void MyFunction(int x, Int32 y)
{
int i;
i = x * y;
}
i would be available but x & y are not. I've tried some project settings, optimization is off.
Any help?
|
|
|
|
|
I tried your example and the debugger could show the values of i, x and y. I am doing this in debug mode. I am not sure why you are having a problem. If you could post the entire program that might help. Not sure.
Bob
|
|
|
|
|
I presume the PC is pointing within the function? I compiled and linked your code and I was able to see the parameters.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
The breakpoint where the program has halted on is probably outside MyFunction.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hello,
I have an application which can start DLL. This DLL should open own window and output some data. I only know that using MessageBox it is possible, but I would like to have more advanced window. Can DLL do it or only application can open/control windows ?
If you have some example I would appriciate. I already tried and created cpp MFC code
with wizard for SDI application than tried to compile it as DLL but it failed.
Krzysztof
|
|
|
|
|
Check this[^] and this[^]
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
I tried according to article from codeguru but i dont have this in my source dll.
static AFX_EXTENSION_MODULE MY_DLL_NAMEDLL = { NULL, NULL };
I have
static char THIS_FILE[] = _FILE_;
Krzysztof
|
|
|
|
|
Hello all,
1. In VS, I've created a Square.cpp file which contains the following:
double square_in_C(double &arg) {return (arg*arg);}
2. I've created a .def file containing the following:
LIBRARY MyXLib
EXPORTS
square_in_C
3. I've added a Module to an Excel file containing the following:
Declare Function square_in_C _
Lib "C:/PATHTOFILE/debug/MyXLib.dll" (arg As Double) As Double
4. Cell B4 contains the number 4. Cell B6 contains "=square_in_C(B4)" (without quotes).
The result in B6: #VALUE!
Anyone know what I'm doing wrong?
Thanks
|
|
|
|
|
Can you debug into square_in_C() to see if the function is being called?
su_penguin wrote: Declare Function square_in_C _Lib "C:/PATHTOFILE/debug/MyXLib.dll" (arg As Double) As Double
Have you verified via Depends or Dumpbin that the exported function is named as you think it is?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I can't exactly call the method to debug in the DLL because there isn't a main method.
And i've tried using Dumpbin.exe at the cmd line and I get:
This application has failed to start because mspdb80.dll was not found.
|
|
|
|
|
su_penguin wrote: I can't exactly call the method to debug in the DLL because there isn't a main method.
What does a lack of main() have to do with it? Using something as antiquated as fprintf() (either to a file or the screen) would suffice.
su_penguin wrote: And I've tried using Dumpbin.exe at the cmd line and I get:
This application has failed to start because mspdb80.dll was not found.
It sounds like an environment variable/path issue. Copy (temporarily) dumpbin.exe to the folder containing mspdb80.dll. See here for more.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
su_penguin wrote: C:/PATHTOFILE/debug/MyXLib.dll"
Will VBA understand forward slashes? Can you call the function in the DLL from VBA?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I'm pretty sure you use the forward slashes. I've tried it with the backslashes, but I still get the same result. I think this is unrelated.
Also, "Can you call the function in the DLL from VBA?"
I'm not sure what you mean...
|
|
|
|
|
In the module where you declare the DLL function, add a public subroutine like this:
Public Sub Test
Dim a as Double
a = square_in_C(10.0)
End Sub
Now, in the VBA editor, put the cursor on that subroutine and press F8. That'll cause the VBA debugger to step into the subroutine and you can check that it calls the DLL routine correctly.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Have you tried formatting the cells to Number? Sometimes that might be the issue. Debug and ensure that the call made properly returned the correct value.(Sorry don't ask me tips for debugging these kind of issues as I never debugged in such environment)
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Hi!
I'm learning to work with webservice, and now I have a problem..
I'm using this guide:
http://www.exforsys.com/tutorials/asp.net/creating-and-consuming-xml-web-services-with-csharp.html[^]
When I try to compile my console-application, this message appears:
Error 1 The type or namespace name 'Service1' does not exist in the namespace 'MyClient.MyService' (are you missing an assembly reference?) C:\Documents and Settings\Bryan\Mina dokument\Visual Studio 2008\Webbservice\MyClient\MyClient\Program.cs 15 23 MyClient
Error 2 The type or namespace name 'Service1' does not exist in the namespace 'MyClient.MyService' (are you missing an assembly reference?) C:\Documents and Settings\Bryan\Mina dokument\Visual Studio 2008\Webbservice\MyClient\MyClient\Program.cs 15 56 MyClient
The code får my webservice is:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
namespace WebServiceExample
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
The code for my console-application:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MyClient
{
class Program
{
[STAThread]
static void Main(string[] args)
{
MyService.Service1 service = new MyService.Service1();
string message = service.HelloWorld();
Console.WriteLine(message);
}
}
}
The console-application is supposed to interact with my webservice. The message "Hello world" should be ouput in my console. But it dosen't work..
Help?
|
|
|
|
|
Bryan Karlsson wrote: Help?
I'd suggest asking in a more[^] appropriate[^] forum[^].
Also, I'd suggest telling people what error messages you get.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
My WinXP machine is configured with 2 NICs. I create one socket with INADDR_ANY and the port that both cards need to listen to. Then I add membership twice with the shared multicast address and each cards' unique interface address. This does exactly what I want, which is duplicate data (so that one can provide a backup for the other).
Unfortunately, the winsock recvfrom() only gives the address from which the packet came from. Is there any way to identify which interface in my machine actually got the data?
Thanks in advance!
|
|
|
|