|
Phil.B wrote:
but which one ????
That's easy: OpenAs_RunDLL . The problem was to find out the function's prototype. Check this code:
typedef void (CALLBACK *PRUNDLLOPENAS)(HWND, HINSTANCE, LPCWSTR, int);
HMODULE h= LoadLibrary("shell32.dll");
PRUNDLLOPENAS pOpenAs_RunDLL = (PRUNDLLOPENAS)GetProcAddress(h, "OpenAs_RunDLL");
pOpenAs_RunDLL(hWnd, NULL, "<the_file>", SW_SHOWNORMAL);
FreeLibrary(h);
The best solution.
rechi
|
|
|
|
|
Thanks once again... another question, how did you manage to get the
signature for the dll call, I had a look a the dll, and found all the documented calls, but the others were all with cardinal numbers.
I used the depandancy walker, not exactly high-tech I know.
Anyway, thanks once again
Phil
bum... and I thought I´d got rid of all the bugs
|
|
|
|
|
This article[^] in MSDN explains it all.
There's no way to tell the signature of the function using only the dll's binary. Actually, it could be possible but you have to disassembly the code and hack it a bit. The function prototype is, in fact, a convention regarding the arguments and the order they have to respect while filling the stack at call-time.
rechi
|
|
|
|
|
Hey, I have a IE toolbar that is supposed to bring up another program. Right now it maximizes the program but the problem is that it is still hidden behind Internet Explorer. What message can I use to set this window to get the focus when it maximizes?
|
|
|
|
|
use SetFocus() to change the window with focus, but it seems that you don't need to change the focus, you have to change the z-order:
SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
|
|
|
|
I replaced "hwnd" with the handle of the window I want to bring to the top but it gives me a compiler error:
error C2661: 'SetWindowPos' : no overloaded function takes 7 parameters
|
|
|
|
|
|
if you use CWnd/CWindow member function SetWindowPos, it receives six parameters, without hwnd, since it is implied, so you must ommit it.
Version with seven parameters is an API function so you must prefix it with global scope operator:
::SetWindowPos(hwnd, ...)
|
|
|
|
|
how to insert a toolbar into windows taskbar like Windows Media Player 9 does?
when you minimize it a mini player toolbar is shown in the taskbar.
|
|
|
|
|
What you want is a "DeskBand". Google for it or search CodeProject, there are enough examples here
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
Respected sir,
i am getting an error: "BK1506: can not open debug\stdafx.sbr"
"error executin c1.exe"
i am getting this type of error in each and every vc++ program whenever i try to compile any program.
I can not find the solution,please help me.
please give me some useful suggestions.
It is urgent.
Thank you.
|
|
|
|
|
This is what microsoft had to say about your problem:
BSCMAKE Error BK1506
cannot open file 'filename' [: reason]
BSCMAKE could not open the given file. This message may be followed by a message from the operating system, giving additional information.
One of the following may have occurred:
The file was locked by another process. If reason was Permission denied, the browser in the development environment might be using the file. Close the Browse window and repeat the build.
The disk was full.
A hardware error occurred.
The specified output file had the same name as an existing subdirectory.
It is impossible to reason someone out of a belief if they were never reasoned into it.
|
|
|
|
|
Hi Folk,
I would like to know where it's possible to know some example of application that uses the IMAPI method.
I'd like to integrate the possibility to burn data on CD in my application.
Each suggest or internet link is welcome.
Thanks in advance.
Andrea;P
|
|
|
|
|
Hello,
I need a MFC component to select multiple folders using a CFileDialog-like dialog. I found tons of wrappers but none of them allow me to select multiple folders. I wonder if such a component exist or do I have to develop it by myself ?
Maybe there's a good MFC components library out there that supports such a great feature. My ideal component is like the Kazaa one, you select folders from a Explorer tree view, each folder name is prefixed by a check box. This way you can select folders from all around your network disks and local hds. Thing you can't do with CFileDialog. However such a component sound very hard to develop as I can't figure out to use the default ShellBrowser component. I would only have to hook its treeview and set its checkbox attribute to true... So easy
Last but not least, as I don't think such a "free" component exists (not found on codeproject nor codeguru), would you be interested by such a component ?
Kind regards,
JM
Web: http://goa.ifrance.com
|
|
|
|
|
created an SDI application, made a Dialog , Connected to the Database using ADO, retrieved the data in CString, but they are not shown in Dialog (Edit Box), I tried UpdateData(), nothing
How to do this?
|
|
|
|
|
Exceter wrote:
retrieved the data in CString
I suppose this is the CString from the edit box ?
Exceter wrote:
I tried UpdateData(),
Did you try UpdateData(TRUE) or UpdateData(FALSE) ?
~RaGE();
|
|
|
|
|
I tried both of them
UpdateData(TRUE) and UpdateData(FALSE)
my CString (CString MyStr) object is of EditBox.
I checked the MyStr with AfxMessageBox, it catches the data
|
|
|
|
|
Exceter wrote:
I checked the MyStr with AfxMessageBox, it catches the data
very odd ... well I'm not 100% sure about it since I always work with controls, never with straight values, but UpdateData(FALSE) should have done it.
Try to create a control member data m_EditBox with the class wizard, and set the text with m_EditBox.SetWindowText(MyStr); . If it is still not updating it, then the display refreshing must hang in another part of your code. (You could also first try a RedrawWindow() after the UpdateData(FALSE) ).
~RaGE();
|
|
|
|
|
Hi, everyone!
I want to developing a new protocol based on IP using raw
socket on windows platform. And I also want to developing
a server and a client using the protocol. I simply want to
define the a new header field of the protocol.
I have referred some materials about how to use raw socket on
windows. But they almost deal with writing a ICMP package. They
have not covered how to develop a new protocol.
Where can I find some materials about how to developing a new
protocol based on IP? Are there some tutorial on this topic?
Thanks in advance,
George
|
|
|
|
|
Check the Raw IP Networking FAQ at http://www.whitefang.com/rin/
PS: Perhaps consider reusing one of the common IP "wrappers" TCP or UDP, while TCP is great for reliability, maybe you could like UDPs approach? However, TCP and UDP provide a lot... I recommend reading 'Effective TCP/IP Programming' from Jon Snader.
|
|
|
|
|
Thanks, Moak buddie!
I think your suggestions are reasonable. And I think
I can use TCP plus RAW socket to resolve my trouble.
Now I meet a new trouble. I have found many sample
codes about how to send raw socket from client. But
I have not found how to write a server that can receive
raw socket from client and write back raw socket. Can
you tell me where can I find the sample codes?
regards,
George
|
|
|
|
|
Hmm, I think there are some ways, but I have to ask - Why to do it with so complicated way?
At first, you will be limited to W2K+ (and of course un*xes), at second the app will must run under the administrative account...
I don't see the benefit of developing a completelly new transfer protocol. I'm also afraid that the amount of code required to achieve that goal will be much higher than the whole rest of the application (client + server).
If you need fast transfers, but don't need to have it reliable - use UDP, if you need that all your data will be delivered and delivered in order, here TCP does it's job.
If you need just attach some your data to the packet use the Options part of the UDP/TCP headers...
But maybe there are benefits I do not see, then pls, try to explain it shortly.
|
|
|
|
|
Thanks, geo_m buddie!
I think your suggestions are reasonable. And I think
I can use TCP plus RAW socket to resolve my trouble.
Now I meet a new trouble. I have found many sample
codes about how to send raw socket from client. But
I have not found how to write a server that can receive
raw socket from client and write back raw socket. Can
you tell me where can I find the sample codes?
regards,
George
|
|
|
|
|
Hey Friends
Can Someone Suggest How To Format VARIANT VT_DATE to MM/DD/YYYY fixed format independent of System Settings ,without Using MFC.
|
|
|
|