|
LPITEMIDLIST pidlDialUp;
LPSHELLFOLDER pDesktop,
pDialUp;
LPITEMIDLIST pidlTarget,
pidlTemp,
pidlDialUp;
LPENUMIDLIST pEnum;
DWORD dwRetrieved;
char szTemp[MAX_PATH];
HRESULT hr;
if(FAILED(SHGetDesktopFolder(&pDesktop)))
return NULL;
pidlDialUp = GetDialUpNetworkingPidl(pDesktop);
a piece of GetDialUpNetworkingPidl...
if(!pDesktop)
return NULL;
//get the pidl for Dial-Up Networking
hr = pDesktop->ParseDisplayName( NULL,
NULL,
L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{992CFFA0-F557-101A-88EC-00DD010CCC48}",
NULL,
&pidlDialUp,
NULL);
This is the ParseDisplayName from windows 98, and I have no clue how the name for dialupnetowking directory look under windows 2000
I need it for creating a shortcut on the desktop programmataticly.
|
|
|
|
|
|
I have one C++ dll with exported functions. But I dont have any details about the function's signatures.Is it possible to find out the same?
Vikram
|
|
|
|
|
No, not without the headers. if the exported functions end with @0 they take no parameters, @4 for 1 parameter, @8 for two parameters and so on. But I guess this won't help you much.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanx for the reply Grag,
Is it possible, by going inside the PE File structure or some another way of reverse engg?
|
|
|
|
|
Which is what Depends.exe does, but it still does not show you the function's signature.
|
|
|
|
|
Hi,
You can use the dependency walker to see the signatures.
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Why do you want or need the export signatures?
Trust in the code Luke. Yea right!
|
|
|
|
|
In order to make use of them, you need to know the return type and the parameter list. Normally, a .H file would provide this, but if you don't have that, other methods must be employed.
|
|
|
|
|
:(Your correct, of cource. I should have realised there was no header file(s) available. I do remember a project, someone submitted some where (possibly here), that took a .DLL and generated the needed files .h and .lib.
Trust in the code Luke. Yea right!
|
|
|
|
|
Hi,
I think I have hit the final roadblock in my bid to learn how to be comfortable with DLLs. I spend the whole of last night trying to figure this out, but to no avail.
I wanted to create a custom window control which all it does is draws a rectangle and blits a bitmap in it. I did it without a DLL and it worked without a hitch. Now, I used the same code and tried to write a DLL interface to it as follows:
//----------------------------------------------------------------------------------long _stdcall InitControl(HINSTANCE instance, HWND hwnd, HBITMAP hBitmap, int x, int y, int width, int height)
{
View::RegisterClass(instance);
//Offset::RegisterClass(instance);
background = new Bitmap(hBitmap);
pCtrl = new Controller(hwnd, background);
SetWinLong<controller *=""> (hwnd, pCtrl);
return 0;
}
//----------------------------------------------------------------------------------
The View::RegisterClass(instance) line is supposed to register my window control class. Using the debugger, I see that the RegisterClassEx(WNDCLASSEX) returns a non-zero value basically indicating success.
Now, in my controller class I try to create the window as:
View::MakeWindow (HWND, hwndParent, childID);
How the CreateWindowEx(...) returns zero. I verified all the parameters and they are not null. I even verified the parent handle (coming from the VB call) through Spy++ and it is indeed the same window with the right HINSTANCE. The error code string is "Cannot find window class". So, I am guessing the window did not get registered.
However, this same code works in a normal program. So, are there some rules when I am registering my own windows in a DLL. Do the parent window and the child window have to share the same DLL or something like that? I cannot understand what I am doing wrong.
Also, the VB declaration is like this:
Public Declare Function InitControl Lib "C:\BOXDLL.dll" (ByVal instance As Long, ByVal hwnd As Long, ByVal back As Long, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer) As Long
and the call is:
InitControl App.hInstance, Me.hwnd, Me.Picture.Handle, 10, 10, 900, 200
I would really appreciate some help here. I have inching towards learning this for a whole month now and I am so close. However, this is the toughest problem I have encountered so far.
Also, I am not using MFC.
If you live around Stuttgart and help me, I will do your laundry for a week
Thanks,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Are you creating an ActiveX control or what?
Need more input.
Trust in the code Luke. Yea right!
|
|
|
|
|
Nope, no ActiveX. However, I fixed it. So, it is all ok now
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Hi,
I am a real beginner in C programming.
I would like to create a sine wave and sample it. How do i start?
Any samples of programs are welcome
Thx
F.K
|
|
|
|
|
try something like this
double y [SAMPLES_NUMBER] ;
for (int i = 0 ; i < SAMPLES_NUMBER ; i++ )
y[i] = sin ( i ) ;
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Or like this:
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#define PI 3.1415926
int main(int argc, char **argv){
double h, x,i,m;
h=15; // number of samples
m=2*PI/h; // sample interval
// create one sinus wave = 360 dgr
for (i=m; i<2*PI;) {
x = sin(i) ;
printf("At time %2.1f %f\n", i, x);
i=i+m;
}
return 0;
}
and display like this
http://www.charlespetzold.com/pw5/SineWave.c
jhaga
|
|
|
|
|
Hi,
I am using VC++, i thought a C code could work with VC++ but when i compile the code, it does not recognize printf
What is the problem?
F.K
|
|
|
|
|
Start with making a new console application with VC++
for printf to work you must have
#include <stdio.h>
if it complains something about precompiled headers then
choose the file, press the right mouse button, settings and
change Category to Precompiled Headers, and check
Not using precompiled headers
instead of printf you can use
cout << i << " " << x << endl;
jhaga
|
|
|
|
|
Do a search of MSDN, search the www, and sites like codeproject and sourceforge (there are more than one example of drawing some-thing as simple as sin).
When plotting points(/pixels/pels) under windows (using the cartasion (miss spelled) coordinate system) you will need to to set the origin, to the center of the client area [Normaly the origin is the upper left hand courner of the client area, but you can change it before you start drawing].
Sorry I could not provide a progaming example, but I do not have any code (at that low a level) to give you.
Trust in the code Luke. Yea right!
|
|
|
|
|
Dear Friends
Kindly write to me about a function to set the Aspect Ratio in WinAPI.
IF possible kindly give an example.
Thanking you.
Adarsh
|
|
|
|
|
I want to use some ATL classes in my WIN32 application. I want to use my application in Internet so I don't want to add extra dll with my application.I want to know if I use these class should I any dll to my application like MFC or ATL dll's is part of Windows installation?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
How to show an explorer style file dialog. I tried giving the OPENFILENAME Flags as OFN_EXPLORER. But still its showing me the old style file open dialog. What else should I do? Saw a member FlagsEx for m_ofn datamamber. But when i give it, it shows error. I am using Win2000. Kindly help......
================
CFileDialog fd(true);
fd.m_ofn.Flags=OFN_ENABLESIZING|OFN_EXPLORER ;
fd.DoModal();
Thanks...
Vini
|
|
|
|
|
If you need an Open dialog with Outlook-style bar on the left side then look here[^].
rechi
|
|
|
|
|
|
i tried adding the manifest file to the project,but it doesn't work.
i guess there must be something else to do to make this.
modified 1-May-21 21:01pm.
|
|
|
|
|