|
This is not at all difficult. Just create your X.dll in the normal way, then create your Y.dll in the normal way, with a reference to the function in X. Then create your application with a reference to Y. You can nest as deep as you like.
It's time for a new signature.
|
|
|
|
|
Hi,
Can you give any sample code that does this.
Because i am struggling with this for past 2 days and its very urgent.
one more How to give reference to my X.dll in Y.dll
|
|
|
|
|
induvijay wrote: Can you give any sample code that does this.
I gave you a reference yesterday; go and read the documentation which explains how to create a dll. As I keep saying it is exactly the same whether it has references to another dll or not.
induvijay wrote: How to give reference to my X.dll in Y.dll
As I keep saying, the same way you would if it was an exe file.
It's time for a new signature.
|
|
|
|
|
it is better for that to use dynamic loading and accesing like that
typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
PGNSI pGNSI = (PGNSI) GetProcAddress( GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo");
if(NULL != pGNSI)
{
pGNSI(&si);
return true;
}
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi,
Thanks for ur reply.
I am using this method.Will it built as a .dll file
|
|
|
|
|
Hi Have created a Editbox derived from CEdit and a spin control. The editbox is attached with Spin control. There should be time value in Edit box and the value (hr ,min ,AM/PM) should increase or decrease according to up and Down arrow of the spin control. Can anyone plese help me how to increse or deecrease the particular selection using spin control.
any help is appriciated..
Thanks..
|
|
|
|
|
Why dont you use the DateTimeControl instead of edit box?
|
|
|
|
|
I need to customiza the control. There will be some image on up and down arrow of the spin control and also some gradient effect shud be there in edit box.
Is these thigs are possibe in datetimeControl ? if ys then please guide me hw to do ?
Thanks..
|
|
|
|
|
AbhiHcl wrote: There will be some image on up and down arrow of the spin control
If you have customised a normal spin control, you can customise, the spin in the Date time picker also. The spin control is actually a child of the Date time picker and you can get the handle of that spin control like HWND hSpin = GetWindow( hDateTimerPicker, GW_CHILD ); . Then you can subclass it.
AbhiHcl wrote: and also some gradient effect shud be there in edit box.
How did you plan to do that? Try the same will work in Date time picker also..
|
|
|
|
|
GetWindow() takes only one parameter as HWnd. I m not clear how to proceed..
Can u plz send me some sample code..plzzz...
|
|
|
|
|
AbhiHcl wrote: GetWindow() takes only one parameter as HWnd. I m not clear how to proceed..
try putting :: infront of it . ::GetWindow(...)
Sorry I dont have a sample for that now...
|
|
|
|
|
To get the text portion currently selected?
See CEdit::GetSel.
|
|
|
|
|
CEdit::GetSel() return DWORD. and I am not sure how to convert the value as string and then iin int. bcoz I need to increment and decrement that value, what ever is selected.
Could u plz help me out for this logic.
|
|
|
|
|
You should make greater use of the MSDN documentation. This page[^] explains the values in the DWORD and how they may be used to get the specific characters of your edit string.
It's time for a new signature.
|
|
|
|
|
Hi,
Im getting the following error while closing handle using CloseHandle() function. Can anyone please tell how to resolve this issue?
First Chance Exception in test.exe(NTDLL.DLL):0xC0000008: Invalid Handle
Thanks,
|
|
|
|
|
The error message is pretty clear no ? You are passing an invalid handle to the CloseHandle function. Use your debugger inspect what might be wrong.
|
|
|
|
|
no.In that folder,im having a image file and Using FindFirstFile function i got handle for that image file. After trying to close that handle the application is getting crashed and it is showing this error.
wsprintf(szSearchFolder,"%s\\*.jpg","C:\\test");
hSearch = FindFirstFile (szSearchFolder, &Foldername);
if (hSearch == INVALID_HANDLE_VALUE)
{
return ERR_FAILED;
}
CloseHandle(hSearch);
|
|
|
|
|
Karthika85 wrote: CloseHandle(hSearch);
This is wrong. You should use FindClose() function to close the handle retured by FindFirstFile()
|
|
|
|
|
As Cedric said, you're passing an invalid handle to the function. Just because the value of the handle isn't INVALID_HANDLE_VALUE it doesn't mean the handle is valid. For example you might...
- be using a handle someone else has already closed
- you're using something uninitialised that contains some rubbish off the stack
- you're overwriting the variable containing the HANDLE value with a wild pointer write
- be doing something really perverse like HANDLE h( reinterpret_cast<HANDLE>( std::rand() ) );
So there's loads of ways a HANDLE can be invalid and not have a value of INVALID_HANDLE_VALUE.
Cheers,
Ash
|
|
|
|
|
I have intialized the handle value to NULL in the declaration.
HANDLE hSearch = NULL;
|
|
|
|
|
How about using FindClose()[^] as the documentation suggests instead of CloseHandle()?
|
|
|
|
|
Hey, well if the webserver hangs or something urldownloadtofile will keep trying to connect and somewhat hang there forever.
So iam in a need of a way to set a timeout for it, so itll stop executing after a set amount of time.
Maybe you guys have any idea how i could realise that?
And yes i do know winsock/wininet etc would be better but iam trying to learn my way up with easier functions for now .
Thanks
modified on Thursday, July 15, 2010 5:57 AM
|
|
|
|
|
Have you tried using the callback (last parameter) and return E_ABORT? That should probably be sufficient for you.
|
|
|
|
|
Well the program is stuck because the function URLDownloadToFile() wont stop executing if the destinationserver hangs so i cant do anything.
|
|
|
|
|
Once more: Have you tried what I suggested?
Here's a crazy thought: what if the callback is called back from the function repeatedly to allow you to monitor progress? And what if returning E_ABORT from that function will terminate the download attempt?
I know it's crazy, but you're allowed to be a little crazy on Thursdays.
|
|
|
|