|
Hadn't thought of static linking to verify the problem. Thanks for the help!
|
|
|
|
|
Statically linking solves everything.
|
|
|
|
|
Hey, Stuart.
Thanks for the help. We're chasing a DEP/NX related bug with an IE8 add on, and while we don't have proof, our sources at MS indicate that ATL is a known issue in this regard, thus we're investigating that possibility.
The simple truth of the matter is I don't know for sure which version of ATL is being referenced. I am assuming that part of the show involves an atl.dll, and I'm not finding one with a product version of 8.0, but I'm admittedly swinging in the dark here.
|
|
|
|
|
Hi,
I am very new to ATL and am working on ATL dll project and am finding it very difficult to debug the application, so if any 1 of u can help me out here by telling me how to debug these application.
Thanking u in advance
|
|
|
|
|
Tell the ATL DLL project what executable should be run in order to invoke the DLL, set breakpoint(s) on the DLL code and start the debug! That's all there is to it, really.
Has to be said, you've been a little stingy with detail about what you're finding difficult, so it's quite difficult to help you really...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks for the support, as i posted in ma query am very new infact this is ma 3rd day in visual c++ , so i dont know much about any of this stuff....
Can u plz tell me in little more detail how to set executable path so than i can put break point and start debugging it. Right know am just executing the project and registering the DLL...
Thanks for ur Support
|
|
|
|
|
Looking at the documentation[^] will help you. For debugging COM objects, there is this page[^].
Also - please make sure you've got the 'Debug' configuration selected before you start debugging.
[edit]PS - (and this is a message for your bosses) Is a little training too much to expect before you ask people to use complex software like Visual Studio???[/edit]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello All,
I have a standard map of type map<string, fileinfo=""> populated in one process and retrieving the values in another process using shared memory concept. The memory is being shared from the server and the client is retrieving the number of pair, but not the values. I am using the following code on the client side for retrieving
HANDLE hOptimizationShared = OpenFileMapping(FILE_MAP_READ, FALSE, szOptimizationShared );
if ( hOptimizationShared != NULL )
{
pOptimizeBuffer = (std::map<string, FileInfo> *)MapViewOfFile(hOptimizationShared, FILE_MAP_READ, 0, 0, 0);
HANDLE hEvent;
if ( pOptimizeBuffer != NULL )
{
mapFileDetails.insert(pOptimizeBuffer->;begin(),pOptimizeBuffer->;end());
UnmapViewOfFile(pOptimizeBuffer);
}
}
The second condition check is getting validated, and i can see proper size of the map, but the elements are not present.
Please help in solving this issue.
Thanks in advance.
Regards,
Neelesh K J Jain.
|
|
|
|
|
That's because a map uses dynamic memory that either a) lies outside the shared memory area, or b) won't be found because the virtual memory address of the shared memory is different in the two processes.
If you need to share a map across processes using shared memory, I'd suggest you use a map that has been expressly designed for that purpose[^].
Oh - and make sure none of the keys or values reference any dynamically allocated memory either, 'cause that won't work either.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks stuart for the information and reply,
but I doubt whether boost/interprocess is present in VC++ 2008. Because I couldn't able to map it.
Thanks,
Neelesh K J Jain.
|
|
|
|
|
Neelesh K J Jain wrote: but I doubt whether boost/interprocess is present in VC++ 2008.
No it's not - but it's open source and has a nice license, so why not just download it (Boost Consulting have Windows installers for Boost[^] - use the 1.38.0 version) and use it?
If you restrict yourself to just what comes with VS2008, you'll make a lot of work for yourself.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello Stuart,
Thanks alot for the information / suggestion. But still I have a doubt.
I am not creating either the key or its value dynamically and as well how its possible to recieve the actual size of the map that is shared from other process using the Named Shared memory. Can you please point me into this concept, If you can share any documents or information URL, that would be great so that I can understand much more thoroughly about the maps.
Thanks once again,
Regards,
Neelesh K J Jain.
|
|
|
|
|
Neelesh K J Jain wrote: I am not creating either the key or its value dynamically and as well how its possible to recieve the actual size of the map that is shared from other process using the Named Shared memory
The map definition in Visual Studio's map class is effectively this:
template<class Key, class Value>
class map
{
_TreeNode<std::pair<Key, Value> >* _Myhead;
size_type size;
};
_TreeNode is this:
template<class Value>
class _TreeNode
{
_TreeNode* _Left;
_TreeNode* _Right;
_TreeNode* _Parent;
Value _Myvalue;
char _Color;
char _Isnil;
};
So, you can see that a map object contains only its size and a pointer to the head of the tree it uses to contain its elements. It uses a red-black tree (I think - or it could be an AVL tree?) because that makes it easy to maintain an element ordering.
Does that answer your query?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Full Marks, I got it, I was thinking, there is something wrong in my code, for that reason, only the size is being retrieved and not the data. I have an explanation now for using the boost/interprocess/map.hpp
Thanks alot.
Thanks and Regards,
Neelesh K J Jain.
|
|
|
|
|
Hi!
I have made an ATL composite control and i want to use it in Siemens ProTool(is like an activex
container with editing and runtime mode).
In runtime mode everything works ok, but in editing mode my control in not drawn is just
gray rectangle with text in it (ATL : Compostie Control).
The reason for this is that container in editing mode fires just OnDraw function...
So is there any way to draw my composite control also in OnDraw function, because it will be nice
to see controls also in editing mode.
I find some solutions where you just override OnDraw function and then you draw something wich
looks like your composite control, but is there any way to draw control that looks like in runtime
(or Resource editor).
Can also someone tell me wich class or function in responsible to show control in runtime mode?
If you want i can post my code.
Best Regards,
Igor
|
|
|
|
|
can i know something about iinternetprotocol. HOw i buid a ATL application with using this interface.
Cheeerzzz
jooohn
modified on Monday, May 4, 2009 6:55 AM
|
|
|
|
|
hiiiii
HOW do i debug ATL (dotnet 2008) project step by step.and its a DLL project.
Smile
jooohn
|
|
|
|
|
I would like to copy file from local to remote machine using WMI in C++. Not quite sure how to do this.
According to MS doc, "Win32_Directory" can be a good candidate. Anybody got idea? Thanks in advance.
Jack Rong
|
|
|
|
|
|
Hi Guys,
I need to call a com dll from another com dll.First com dll would be in VC++ 6.0 and second would be in VC++ 2008. This First Com Dll would call VC++ 2008 com dll. Going further I need to create a VB6.0 client to call vc++ 6.0 com dll.
I tried it but facing problem while calling VC++ 2008 com dll from VC++ 6.0 com dll. Do you guys have a solution for this. or simply tell me how to call a com dll from another com dll? I think this will do the needful.
regards,
.......
|
|
|
|
|
Hi,
i have an ActiveX dll(using ATL) in webserver and i included it in my html page ..
and when client requests for that html the dll gets installed(registered) with his permission but the issue it"s getting successfully installed on Admin machine..but in non-admin machine even the message box that prompts to install dll is not displaying.....is there any limitation for non-admin...
when itry to register the dll using regsvr32 in nonadmin it works fine but i was unable to do it thru html...
I searched for implementing REGfreeCOM but i could"nt ..
pls help me out...
|
|
|
|
|
|
I have a class which is using the float as template parameter . The code compiles correctly in VC6.0. But in VS2008 float is not allowed as template paramemter. So i am using the float pointer(please let me know if there is any alternative other than using int as data type). when I compile the code I get following errors at multiple places
syntax error : missing ',' before identifier 'lowerBound'
syntax error : missing ',' before identifier 'upperBound'
'tBoundedType' : too many template arguments
How can fix this? what is error in this class declaration
here is my float pointer class declaration
#ifndef tBoundedType_h
#define tBoundedType_h
#define CLASSID_TBOUNDEDTYPE 27
template<float float="" upperbound="">
class tBoundedType
{
public:
tBoundedType(); // Sets the value to lowerBound.
tBoundedType(float * value);
// An Ensure fails if value is not between lowerBound and upperBound.
// tBoundedType<float float="" upperbound=""> & operator=(float *);
// An Ensure fails if value is not between lowerBound and upperBound.
static float LowerBound() { return lowerBound; }
static float UpperBound() { return upperBound; }
// operator type() const { return mValue; }
// Stream me
//virtual void PerformIO(tNSStream *);
virtual long GetClassId() const { return CLASSID_TBOUNDEDTYPE; }
long GetVersion() const { return 1; }
protected:
float mValue;
};
template<float float="" upperbound="">
tBoundedType<lowerbound,>::tBoundedType()
: mValue(*lowerBound)
{
}
template<float float="" upperbound="">
tBoundedType<float float="" upperbound="">::tBoundedType(float * newValue)
: mValue(*newValue)
{
Ensure(mValue >= *lowerBound);
Ensure(mValue <= *upperBound);
}
template<float float="" upperbound="">
tBoundedType<float upperbound=""> & tBoundedType<float float="" upperbound="">::operator=(type newValue)
{
Ensure(newValue >= lowerBound);
Ensure(newValue <= upperBound);
mValue = *newValue;
return *this;
}
template<float float="" upperbound="">
void tBoundedType<float float="" upperbound="">::PerformIO( tNSStream *stream )
{
//int version = GetVersion();
//stream->DoIO( version );
//stream->DoIO( mValue );
}
|
|
|
|
|
When you post code, please tick the "Auto-encode HTML when pasting?" check-box. Doing that escapes the < sign, making your template code readable - which it really isn't now.
Hemant kulkarni wrote: please let me know if there is any alternative other than using int as data type
C++ templates only allow types and integral constant values as template parameters - so, no alternative, really...unless you encode the floating point values as integral values.
Repost your code with the "Auto-encode HTML when pasting?" checkbox ticked and we may be able to help you with your problem.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
I have written a win32 dll in VC++ 2008. I am calling this DLL from VC++ 6.0 com dll.this com dll
has vb exe as client. when i am calling running prog through com dll everything working fine,
however, when i try to run through vb output is not coming neither any error.
can someone suggest me what's wrong with the application?
however same vb exe is working through com dll. Any guess?
|
|
|
|