|
I was wondering if we can call a remote object (over tcp) hosted in a .net service from native c++
Please through some light on this.
Thanks,
Srini
|
|
|
|
|
How do i implement a marquee in a dialog based application. i want to do the horizontal way. i have seen the vertical application available here in codeproject.
|
|
|
|
|
You can use of WM_TIMER for it.
|
|
|
|
|
can u explain a little more in detail?
|
|
|
|
|
If you have vertical application available you just need to change the co-ordinates
instead of changing y co-ordinate change x coordinate and keep y coordinate fixed.
Regards,
Sandip.
|
|
|
|
|
|
I try to get them use WMI, but in WMI the Win32_TemperatureProbe's CurrentreadingThe property's presence is reserved for future use.
I find somebody get the cpu and mainboard’temperature us acpi.
how to get the temperature?
|
|
|
|
|
Hi!
I'm Working in a VC++ Simulation project. I've got an error which says,
c:\program files\delta3d_rel-2.0.0\inc\dtcore\globals.h(29) : error C2143: syntax error : missing ';' before 'namespace'
globals.h is a Delta3D Simulation Engine's file. I did not touch it at all. What might be the problem? What is the resolution?
|
|
|
|
|
the problem might be because you have a syntax error (a missing ; or a brackets { } misplaced) before #including globals.h
|
|
|
|
|
I didn't miss any ';' at all. Infact it's system(Simulation Engine's) file. What to do? Here is the complete code for globals.h.
#ifndef DELTA_GLOBALS
#define DELTA_GLOBALS
#include <string>
#include <dtCore/export.h>
namespace dtCore
{
DT_CORE_EXPORT void SetDataFilePathList( const std::string& pathList );
DT_CORE_EXPORT std::string GetDataFilePathList();
DT_CORE_EXPORT std::string GetDeltaDataPathList();
DT_CORE_EXPORT std::string GetDeltaRootPath();
DT_CORE_EXPORT std::string GetEnvironment(const std::string& env );
DT_CORE_EXPORT void SetEnvironment(const std::string& name, const std::string& value);
DT_CORE_EXPORT std::string FindFileInPathList(const std::string &fileName);
}
#endif //DELTA_GLOBALS
|
|
|
|
|
so you didn't read my post !!!
i said the error is NOT in the globals.h file itself but around it.
when you #include a header, it's as if its content was copied/pasted at the location of the #include directive. so if you have an arror in a file #included before that one, on in the including file itself, you might see such errors in files you actually didn't modified.
also, if it's a system file, be sure to #include <> rather than #include ""
|
|
|
|
|
Here is my complete listings where the 'globals.h' is included.
#include "HelloWorld.h"
#include <dtCore/globals.h>
#include <dtCore/object.h>
#include <dtCore/orbitmotionmodel.h>
#include <dtCore/scene.h>
#include <osgDB/FileUtils>
#include <dtCore/dt.h>
#include <dtABC/application.h>
If include HelloWorld.h like u said (<helloworld.h>) it shows me error which says Cannot open include file. No such file or Directory. What to do?
|
|
|
|
|
I can't believe HelloWorld.h being a system header.
BTW usually non-system headers includes (like #include "HelloWorld.h" ) follows the system ones. Your snippet shows the opposite.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Not HelloWorld.h. It's globals.h.
|
|
|
|
|
I was suggesting (the same toxcct did) to put #include "HelloWorld.h" at the end of your include list.
Often problems originate in slightly different places with respect the one the misbehaviour shows up.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
what happens if you #include "HelloWorld.h" after every other system includes ?
|
|
|
|
|
It gives me errors if I include after all the system files.
d:\myprojects\myprojects\myprojects\helloworld.cpp(13) : error C2533: 'HelloWorld::{ctor}' : constructors not allowed a return type
d:\myprojects\myprojects\myprojects\helloworld.cpp(65) : error C2264: 'HelloWorld::HelloWorld' : error in function definition or declaration; function not called
|
|
|
|
|
Please post the code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Here is the code.
#include "HelloWorld.h"
#include <dtCore/globals.h>
#include <dtCore/object.h>
#include <dtCore/orbitmotionmodel.h>
#include <dtCore/scene.h>
#include <osgDB/FileUtils>
#include <dtCore/dt.h>
#include <dtABC/application.h>
#include <dtCore/deltawin.h>
HelloWorld::HelloWorld(const std::string& configFilename):dtABC::Application(configFilename),mText(0),mOrbitMotionModel(0)
{
if(osgDB::findDataFile(configFilename).empty())
{
GenerateDefaultConfigFile();
}
}
HelloWorld::~HelloWorld()
{
}
void HelloWorld::Config()
{
mText = new dtCore::Object("Text");
mText->LoadFile("HelloWorld.flt");
GetScene()->AddDrawable( mText.get() );
dtCore:: Transform camPos;
camPos.SetLookAt( 0.0f, -100.0f, 20.0f,
0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f);
GetCamera()->SetTransform(camPos);
mOrbitMotionModel = new dtCore::OrbitMotionModel(GetKeyboard(),GetMouse());
mOrbitMotionModel->SetTarget(GetCamera());
}
int main()
{
dtCore::SetDataFilePathList( ".;" + dtCore::GetDeltaDataPathList());
dtCore::RefPtr<HelloWorld> app = new HelloWorld( "config.xml" );
app->Config();
app->Run();
return 0;
}
|
|
|
|
|
And the HelloWorld.h code?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
#include <dtABC/application.h>
#include <dtCore/refptr.h>
namespace dtCore
{
class Object;
class OrbitMotionModel;
}
class HelloWorld: public dtABC::Application
{
public:
HelloWorld(const std::string &configFilename);
protected:
virtual ~HelloWorld();
public:
virtual void Config();
private:
dtCore::RefPtr<dtCore::Object> mText;
dtCore::RefPtr<dtCore::OrbitMotionModel> mOrbitMotionModel;
}
|
|
|
|
|
Well, I cannot spot the error. The code seems OK.
Anyway, I insist, the right place for #include "HelloWorld.h" is at the bottom of the list.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
you're missing a ; after the closing } of the class definition.
a class definition is like this :
class C {
}<code>;</code>
|
|
|
|
|
Then it probably means you have errors in that file. Post some code (and please, use the code block tags).
|
|
|
|
|
Here is the complete listing.
#include "HelloWorld.h"
#include <dtCore/globals.h>
#include <dtCore/object.h>
#include <dtCore/orbitmotionmodel.h>
#include <dtCore/scene.h>
#include <osgDB/FileUtils>
#include <dtCore/dt.h>
#include <dtABC/application.h>
#include <dtCore/deltawin.h>
HelloWorld::HelloWorld(const std::string& configFilename):dtABC::Application(configFilename),mText(0),mOrbitMotionModel(0)
{
if(osgDB::findDataFile(configFilename).empty())
{
GenerateDefaultConfigFile();
}
}
HelloWorld::~HelloWorld()
{
}
void HelloWorld::Config()
{
mText = new dtCore::Object("Text");
mText->LoadFile("HelloWorld.flt");
GetScene()->AddDrawable( mText.get() );
dtCore:: Transform camPos;
camPos.SetLookAt( 0.0f, -100.0f, 20.0f,
0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f);
GetCamera()->SetTransform(camPos);
mOrbitMotionModel = new dtCore::OrbitMotionModel(GetKeyboard(),GetMouse());
mOrbitMotionModel->SetTarget(GetCamera());
}
int main()
{
dtCore::SetDataFilePathList( ".;" + dtCore::GetDeltaDataPathList());
dtCore::RefPtr<HelloWorld> app = new HelloWorld( "config.xml" );
app->Config();
app->Run();
return 0;
}
|
|
|
|