|
Maybe you need to include header file
|
|
|
|
|
Hi,
Iam Leela from India..
I would like to know if there is any tool that helps us to know what all FUNCTION call are made on a particular DLL (Windows or third party) by a particular application..
Thanks a lot..
Regards,
Leela
Thanks a lot for answering my questions..
|
|
|
|
|
Hi Leela,
Take a look at code injection, there are some really good articles on codeproject about it.
http://www.codeproject.com/threads/winspy.asp
http://www.codeproject.com/system/inject2exe.asp
http://www.codeproject.com/useritems/inject2it.asp
/Mark
|
|
|
|
|
Hi Mark,
Thanks a lot for pointing the resource. But i want to know if there is any utility (free or paid) to track dll calls done on my system.
I would like to know if atleast there is any utility to LOG all SQL queires run on a PARTICULAR table in MS SQL..
Thanks a lot..
|
|
|
|
|
If you are looking for something to log all queries from a database check the documentation. Most, if not all, database implementations support a way trace all the SQL commands made to their database. That would be a lot easier then injecting your code and logging them yourself.
Even if you can't restrict it to one table, you can log everything and later use something like grep to get just the lines you are interested in. Hope this helps.
/Mark
|
|
|
|
|
Hi Mark,
Thanks for you suggestion.
I see that we can track activity on SQL server using SQL Profiler..
http://msdn2.microsoft.com/en-us/library/ms979207.aspx
Regards,
Leela
-- modified at 12:59 Monday 15th January, 2007
|
|
|
|
|
ToughGuy9 wrote:
I would like to know if there is any tool that helps us to know what all FUNCTION call are made on a particular DLL (Windows or third party) by a particular application..
HI Leela or ToughGuy9 ( seems some Contradiction)
anyways you can see all the function exported by particular dll via tool name Depends, which is part of regular Visual Studio! and it can be found in tools directory of VisualStudio installation
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Hi Alok,
Thanks for your post..
I am using depends (Dependancy Walker) to look at list of functions and what functions are called. But what i want is to track the FUNCTION CALLS..
Regd the contradiction with my Name (nick) and display name : My name is LEELA KRISHNA.. My nick is LEELA..
Regards,
|
|
|
|
|
Hi all
I had written a FTP directory listing program.Problem here is its working fine on my FTP server,but its not working working on client ftpserver i.e.,iam unable to get directory listing there....
I used following classes:
class CFileFind;
class CInternetSession;
class CFtpFileFind;
pf = is.GetFtpConnection((LPCTSTR)servername, (LPCTSTR)username, (LPCTSTR) pwd, portno, session_mode);
although i have set session_mode both TRUE and FALSE, it still doesn't work or throw any exception
Thanks,
xyz
|
|
|
|
|
Hi,
I am a newbie in MFC gui programming. Here is one problem that I am facing..
I am setting text in an edit control and then i need to set the cursor at the end of the text. If I use SetEditSel, it highlights the text also. I do not want the highlighting of the text. I just want the cursor to be at the end of the text ,after I have called SetWindowText().
I searched around and found that SetCursorPos can help. But I do not know how to provide the correct text coordinates to this API. any ideas would be greatly appreciated.
Code snippet:
InSomeHandler(){
GetWindowText(str);
// do something
SetWindowText(str);
// set the cursor at the end: don't know how to do it..
}
Be the change you wish to see...
|
|
|
|
|
You can use SetSel for this. I assume you're using a CEdit control. Let's say this control is accessed through a member variable called m_edit and contains the text str , you can then set the cursor to the end of the control by calling this:
m_edit.SetSel(str.GetLength(), 0, FALSE);
|
|
|
|
|
...and probably other VC editions.
I've not the need/use of Intellisense and it bothers me a lot slowing down my projects load/unload time so I searched and found a way to get rid of it.
Simply delete C:\Program Files\Microsoft Visual Studio 8\VC\vcpackages\feacp.dll.
Yarp
http://www.senosoft.com/
|
|
|
|
|
Hello gang,
I have an engine in legacy c as a dll and wanna get its functionality from a UI written in c#. what makes me sick is that as project grows and complexities increased how is it possible to debug c# and its legacy 'c' dll toghether. I again say simply i want to F11 my c# line and go to legacy c functions and vice versa ...
give me a clue please if you know the tips...
http://www.packetforum.org
|
|
|
|
|
I wrote a DLL and want to put it into a XP workstation in my Lan, certainly, i know its administrator account password. but how can i put it into its system folder without setting any share folder manually? if it is possible, then how can i invoke the rundll32 command to load my dll remotely? Thanks for your instruction.
liur
|
|
|
|
|
You can't "run" a DLL. You can load it with an executable, but you can't run it by itself.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thanks, my mean is how to put the dll into remote XP and loading it by rundll32 command. could you give me any suggestion?
liur
|
|
|
|
|
First you have to get the DLL over to that machine. So it's a simple case of how do you want to get the file over there. You have options: E-mail, on a floppy, windows file sharing, etc.
|
|
|
|
|
I am trying to pass a reference through a couple of layers of functions, and I am getting a C2664 Error.
Here is my setup:
I have a class [ c_ClassOne ] which contains a pointer to an object [ p_MyObject ].
I have a second class [ c_ClassTwo ] which has a function [ FunctionOne(MYOBJECTTYPE* myObject) ]
I have a third class [ c_ClassThree ] which also has a function [ FunctionTwo(MYOBJECTTYPE* myObject) ]
I then try to pass the reference to the pointer p_MyObject from c_ClassOne to be used within FunctionTwo.
So in a function within c_ClassOne I create an instance of c_ClassTwo [ myClassTwo ]
I then pass a reference to p_MyObject as follows: myClassTwo.FunctionOne(&p_MyObject);
Then within FunctionOne, I create an Instance of c_ClassThree [ myClassThree ]
I then attempt to once again pass the reference to p_MyObject: myClassThree.FunctionTwo(&p_MyObject);
On that line I get the following error:
error C2664: 'CD3DInitialize::Enumerate' : cannot convert parameter 1 from 'LPDIRECT3D9 ** ' to 'LPDIRECT3D9'
Note: LPDIRECT3D9 is the Object Type of p_MyObject.
Can anyone explain what I am doing wrong, and help me understand how to do it correctly?
Thanks,
Jody
|
|
|
|
|
Just pass it like this:
myClassTwo.FunctionOne(p_MyObject);
myClassThree.FunctionOne(p_MyObject);
Your functions are accepting pointers, and the object you're passing is a pointer. There is no need to dereference it.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hello, I have Oracle 9i and Oracle Developer6i.I want to build an Oracle DB base using Oracle tools how to do it?. Then I want to developt a db application using VC++6 to access oracle db .
Thank u
|
|
|
|
|
to access oracle db using vc++, you can use ADO:
#define INITGUID
#import "c:\program files\common files\system\ado\msado15.dll" rename_namespace("ADO_RWXLS") rename("EOF","EndOfFile")
using namespace ADO_RWXLS;
#include "icrsint.h"
_ConnectionPtr pConn;
::CoInitialize(NULL);
pConn.CreateInstance(__uuidof(Connection));
CString strConn;
strConn.Format(_T("Provider=MSDAORA.1;Data Source=%s;Database=%s;User ID=yourname;Password=yourpasswd"),strServerName,strServerName);
pConn->Open(str_Connection, "", "", adOpenUnspecified);
liur
-- modified at 2:22 Sunday 14th January, 2007
|
|
|
|
|
Hi all,
well allthough I'm new to C++ I've done my share of development in more user friendly environments, mainly C#.
Anyhow I want to learn C++ as mainly personal interest as my professional life will be focused primarly in .NET development whenever it is needed.
To learn the basics of the language I'm starting with a real easy Math class that will initially implement a Matrix (no templates). Nothing fancy but an easy place to start to at least start learning Object Oriented programming in C++ like any other.
Well the thing is that I'm completely stumped with an error I'm getting. I've created a simple Win32 console app that links my FastMath.dll and uses the FMatrix class defined inside. Test app code is as simple as it can get, it only instantiates one FMatrix and then deletes it, and something that simple is giving me a runtime error. Here's the code in the tesp app:
#include "stdafx.h"
#include "FMatrix.h"
using namespace FastMath;
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
FMatrix *a=new FMatrix(5);
cout << "A is a [" << a->GetRowCount() << "x" << a->GetColumnCount() << "] matrix." << endl;
delete a;
return 0;
}
Ok the error I'm getting is when executing "delete a". The error message is:
Windows has triggered a breakpoint in Tester.exe.
This may be due to a corruption of the heap, and indicates a bug in Tester.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information
If I try to continue I get the same error once and then succesive Assertion Failed error messages: "Expression: _CrtIsValidHeapPointer(pUserData)" and if I ignore that I get a HEAP CORRUPTION DETECTED error message "CRT detected that the application wrote to memory after end of heap buffer."
I really do not understand what I'm doing wrong in my FMatrix file. I'm including header and source files below:
FMatrix.h
#ifdef FASTMATH_EXPORTS
#define FASTMATH_API __declspec(dllexport)
#else
#define FASTMATH_API __declspec(dllimport)
#endif
#pragma once
#include "StdAfx.h"
namespace FastMath
{
class FASTMATH_API FMatrix
{
private:
int rw,cl;
double *val;
FMatrix(void);
FMatrix(unsigned int,bool);
FMatrix(unsigned int,unsigned int,bool);
void initMatrix(unsigned int,unsigned int,bool);
void destroy(void);
public:
FMatrix(const FMatrix&);
FMatrix(unsigned int);
FMatrix(unsigned int,unsigned int);
FMatrix(unsigned int,unsigned int,double**);
~FMatrix(void);
static FMatrix* CreateIdentity(unsigned int);
static FMatrix* CreateFull(unsigned int,unsigned int,double);
static FMatrix* CreateRandomIntMatrix(unsigned int,unsigned int,int,int);
static FMatrix* CreateRandomDblMatrix(unsigned int,unsigned int,double,double);
double GetItem(unsigned int,unsigned int) const;
void SetItem(unsigned int,unsigned int,double);
int GetRowCount() const;
int GetColumnCount() const;
static bool AreSameSize(const FMatrix&,const FMatrix&);
FMatrix& operator =(const FMatrix&);
FMatrix& operator -() const;
FMatrix& operator +(const FMatrix&) const;
FMatrix& operator -(const FMatrix&) const;
FMatrix& operator *(double) const;
FMatrix& operator *(const FMatrix&) const;
FMatrix& operator !() const;
bool operator ==(const FMatrix&) const;
bool operator !=(const FMatrix&) const;
};
}
FMatrix.cpp (only relevant code)
#include "StdAfx.h"
#include "FMatrix.h"
#include "time.h"
#include <cstdlib>
#include <iostream>
using namespace FastMath;
using namespace std;
void FMatrix::initMatrix(unsigned int r,unsigned int c, bool initValues)
{
rw=r;
cl=c;
val=new double[rw*cl];
#ifdef _DEBUG
cout <<"++ Matrix created." << endl;
#endif
if (initValues)
{
for (int i=0;i<rw;i++)
{
for (int j=0;j<cl;j++)
*(val+i*cl+j)=0;
}
}
}
FMatrix::FMatrix(unsigned int dim)
{
initMatrix(dim,dim,true);
}
FMatrix::~FMatrix()
{
destroy();
}
void FMatrix::destroy()
{
delete[] val;
val=NULL;
#ifdef _DEBUG
cout << "-- Matrix destroyed." << endl;
#endif
}
1. Only pointer in my class is private member double *val;
2. Only pointer used in constructor is *val that is set with a new double[whatever], thus no non initialized pointers are left hanging once constructor is through instantiating my class.
3. Destructor calls private method destroy() where I delete [] val, set it to NULL and log to the console that the destructor was called.
I'm really confused because I dont know what I'm doing wrong. The thing is if I use in the Test app the static constructors (CreateRandomIntMatrix for example) and I dont have to manually delete them everything works great and the destructor of my two matrixes is called all by itself. But when I explecitly instantiate with the new operator in my test app and thus have to delete them myself in that same app I get the errors described above.
The worst thing is that I'm not getting an error anywhere that i can see when I step through with the debugger. Everything executes perfectly if I put a breakpoint on the exit bracket of my destroy() method. Once I hit the breakpoint and I press continue and the only thing it should do is step out of the Destroy() method and return to the the Test app I get the error. I dont know what's going on at all.
Can this be due to something else and not a coding problem? Some corrupted VS 2005 file or something? I am getting a constant message evey now and then when I build or start debuging my app that tells me "This project is out of date. FastMath - Debug Win32" ??? anyone know what this is and if it can be linked to my problem?
Any help plz?
-- modified at 23:18 Saturday 13th January, 2007
|
|
|
|
|
gumi_r@msn.com wrote: "CRT detected that the application wrote to memory after end of heap buffer."
That means that you allocated a block of memory, but wrote past the end of the block.
|
|
|
|
|
Hi Micheal,
thanks for the input. I guessed that much myselft but the problem is that I'll be damned if I see where I wrote past the allocated memory. Only the constructor and destructor are running in my test app and I don't see anywhere in the running code where I could be writing past any alocated memory.
I really dont understand what is wrong.
|
|
|
|
|
Hi,
Have you tried to override the delete operator?;)
Regards,
Eli
|
|
|
|