|
Hello All,
Does anybody know how to find out interfaces exposed by a driver (.sys file)?
Thanks in advance
|
|
|
|
|
I have App.exe which uses Dll.dll, I also add classical Microsoft manifest file App.manifest.exe to enable XP styles for common controls.
Now question how can I disable influence of manifest on Dll.dll
Which means I want that App.exe continue to use
comctl32.dll (ver 6) new one
but
Dll.dll should use
comctl32.dll (ver 5) old one
Load / Unload library - already try not helps
#define/#undefine IE_CONTLOLS - already try doesnt helps
I need to customize body of manifest somehow include or exclude styles in the dependency section
Thanks.
|
|
|
|
|
Hi,
I have created a test dll in Fortran that squares an input number.
Then I'm trying to call this dll from C++.NET using the following bit of code:
<br />
#include <iostream><br />
using namespace std;<br />
extern "C" __declspec(dllimport)double square(double X);<br />
<br />
int main(int argc, char* argv[])<br />
{<br />
double a=4;<br />
double asq = square(a);<br />
cout << a << " " << asq << endl;<br />
return 0;<br />
}<br />
<code><br />
<br />
I get the following error:<br />
HelloWorld error LNK2019: unresolved external symbol __imp__square referenced in function _main<br />
<br />
I've added MyDll.lib as a reference from the Fortran code but no success. (I'm not able to add MyDll.dll however, is this normal?)<br />
Any ideas please?<br />
Kash
|
|
|
|
|
In the C++ .NET Framework you don't import functions from a DLL like you do in Win32; the syntax is different. The correct method is to use the DllImport attribute, which is located in: System::Runtime::InteropServices.
Using the DllImport Attribute[^]
|
|
|
|
|
Hi all,
I've created a form with a number of child windows. One certain window is behaving very strangely. If I open the child window and then close it, the main form will not close - by this I mean I can't click the exit button or use the exit menu item. The main reason for my confusion is that this behaviour only happens on certain machines.
Does anyone have any knowledge of why this might be occurring? It must have something to do with the individual machines but I can't find anything that would cause this and I was just wondering if any of you guys have come across this before.
Thanks in advance
Rich
|
|
|
|
|
I think there is a problem in your code. Try to debug, after you close certan window. Or try recreate this child window.
quote:
behaviour only happens on certain machines
If you use same setting for this child window then all child would have same problem
|
|
|
|
|
That's what's confusing me. If it happened everywhere I would at least have a starting point.
|
|
|
|
|
Try to disable all your code. If error still exist, try to delete and create another child
|
|
|
|
|
I know that VS2005 is still in beta, and would like to dip my toe into the 2005 experience/IDE along with C++/CLI. I know that VS2005 was available for free download a while ago but unfortunatly i missed the boat! - I am not an MSDN subscriber? Is it possible for me to download the beta of VS2005 from anywhere else?
Cheers
|
|
|
|
|
|
thats excellent.. thankyou
|
|
|
|
|
|
HI all
I have the following problem .
I have a COblist member declared as protected in a class
CObList m_DataList;
Now in the virtual destructor of the same class
the data is cleaned up like this...
while(!m_DataList.IsEmpty())
delete m_DataList.RemoveHead();
...here assume the m_DataList has N elements ...
deleting N-1 elements is not a problem ..but when the Nth element is Removed from the m_DataList then Assertion occurs ..saying
Invalid heap pointer !! . I could not understand this at all ..
When the destructor is able to delete all the elements except the last one what could be the problem ?
Why should I face assertion when the last element is deleted ?
Can someone help me pls ?
dharani
redindian
|
|
|
|
|
First of all, you should investigate STL containers, MFC containers are crap.
Have you looked in the debugger to see the state of your pointers ? Is it possible that the problem is that you're stuffing IN an invalid pointer, and you don't see it until you try to delete it ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I will give the vertices of outer polygon, the code need to generate the vertices of inner polygon , with given tolerance for e.g. 50 mt.
|
|
|
|
|
Got the geometrical algorithm ? code comes next
Or r u expecting a ready made code for ur requirement ?
redindian
|
|
|
|
|
hi i am new to cpp using include
#include studio.h
#include
i used iostream before though now i am trying to make a simple code for input and comparing the input could anyone help me? i just need some simple beginning code thx u
|
|
|
|
|
Hi!
I'm not quite sure what you're asking about, but if it is how to use include then I'll give it a shot.
#include is a preprocessing directive, that means that it's performed before the code is compiled (in a separate pass). When you use #include, the preprocessor will behave as though it copies the contents of the file you want to include into the place where the #include directive was (some preprocessors might create a new file and paste it all together, while some might do it in memory etc.). There are two different ways to use #include. The first one is with angle brackets and the second one is with quotation marks. The difference between these is where they search for the files to include.
#include <stdio.h> // Include an include file that usually came with the compiler
#include "myinclude.h" // Include a file in the current directory
When using angle brackets the preprocessor will search for the file among the include files that came with the compiler or other directories you have added to its search list. The quotation mark on the other hand will make the preprocessor first search through the current directory (project directory) and if it didn't find any files who matched the name, it will search through the same directories as if you had used angle brackets.
|
|
|
|
|
firstly, be careful of what you write ... studio.h don't exist. the correct file is stdio.h (std means standard, io means input/output, and .h for header file. < > means that the compiler will search the file into its own headers directory instead of within the current project).
to use C++ standard streams, you'll have to include <iostream> . You see that there is no .h ending the file name, jut because it haven't any. by opposite to stdio.h, iostream is no inheritated from the C language. It is a header from the standard C++. The .h were removed because Stroustroup considered that it was redondant...
now, what can happen is even if you included the file, you cannot access the stream functions because they are not in the same namespace as from where they are called. the easiest way to solve this it to put at the beginning of the local scope where you would use cout /cin this instruction :
using namespace std;
hope you understood the most
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi!
I'm making a GUI for an engine I'm working on. The engine is separated into two win32 dll's and the GUI is supposed to be written in C#. I've decided to make the interface between C# and the engine using C++/CLI since that seems like the cleanest and best solution. So what I have is the following:
EngineA.dll - the two engine dll's in win32 code
EngineB.dll - *
SVCore.dll - The C++/CLI interface class. Exposes functionality from the engines
SceneViewer.exe - The gui
Now the problem arises when I'm trying to include a reference to SVCore into the SceneViewer project (etiher a reference to the project or to the target dll). The class compiles and I get the following warning:
"Warning 8 Could not load file or assembly 'SVCore, Version=1.0.2057.40039, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
The other problem is when I try to use a canvas control that's using SVCore. I get a similar error message saying that it failed to create the component because it failed to load SVCore or one of its dependencies.
Now I've found out that this is because the designer doesn't seem to find the engine dll's. I just find that strange since I've tried to place them everywhere within the project folders. Everything seems to work fine though when I put the dll's in the system32 directory - but this is NOT an option at all (editing the path is not an option either). So does anybody have any solutions as to how I should set up my projects for this to work? Or any other way to fix the problem?
Thank you in advance!
|
|
|
|
|
Hi _eulogy_,
I ran across your post over on the Microsoft Technical Forums. Pretty interesting stuff,...that left me thoroughly mystified.
Does your SceneViewer code derive from the IDesignerHost interface?
Given the sophistication of your project, I can't imagine that Visual Studio can't find your DLLs (this is TOO simple an error, and you obviously know your way around the compiler).
I've noticed that sometimes (and this happens to me all the time), if you create multiple intersecting errors that don't conform to the compiler's internal diagnotic logic, it will issue an error message, but that message will be misleading.
|
|
|
|
|
Thank you for the interest
No, I'm not inheriting from IDesignerHost and I'm still puzzled by this problem. I've found that doing the following things work:
1: Put the engine dll's in windows\system32
2: Put the location of the engine dll's in the path
3: Put the engine dll's in the same folder as devenv.exe
Point number three made me a bit more certain about a suspicion I had. It seems as though the ide loads up the managed dll's as normal from their right directories, because thir whereabouts are stored in the project. The unmanaged engine dll's on the other hand are only referenced by one of the managed dll's and in an "unmanaged way". The problem might be that the ide thinks that the current search directory is the same as the running exe resides in (which happens to be devenv.exe) and not the directory that the managed dll resides in or the directory pointed to by the project.
This is only a hypothesis though (hope my ramblings made sense :P).
|
|
|
|
|
Hmmm... seems like I was suddenly logged out.
|
|
|
|
|
I read what the responses were over at MS Technical Forums. I was on the wrong track with my last question.
In Visual C++ .NET you reference another .NET assembly by inserting the #using directive in your source code. You also, as you now know, must set the LIBPATH variable that the compiler uses to search for your associated .NET assemblies. This can be done very simply by opening the Property pages for your Project (from the Solution Explorer). The following MSDN information will explain this:
The Using Directive[^]
And, you might want to read this, it describes how to set the path of directories that Visual Studio looks in for project files and Dlls.
VC++ Directories, Projects, and Options Dialog Box[^]
Referencing an unmanaged Win32 DLL is different. You must use Interop.
Consuming Unmanaged DLL Functions[^]
A better solutuion would be to use the Type Library Importer to convert your Win32 DLLs to assemblies, which can then be used in a managed project as if they were .NET assemblies.
Type Library Importer[^]
|
|
|
|
|
ok i want to know the way how can i get the list of items shared on any computer. i want my application to search the network for available items or shared folders files on network that are accessible
|
|
|
|