|
Does the PrntScrn key not work, or are you wanting to do it via code?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I have to add an ability to get "screenshots" of fullscreen dos apps to some opensource vnc (UltraVNC, TightVNC or something other...) in order to make possible to programm our samsung office phonestations remotely (7 ones in the different towns). Their program (pcmmc80) is run in fullscreen graphical mode and somewhy doesn't run in VMWare and other VirtualPSs =(
|
|
|
|
|
Hi
Iam calling a fortran function from c++ code.Actually it enters into the fortran code , but it not passes the correct argument values.instaed of passing 1 & 8 valeu it passes the 0 value to the fortran functions.
Please help me to solve this problem.Below is my code.
fortarn function (DLL:Dynamic linked linrary)
SUBROUTINE MATH(INTEGER A, INTEGER B)
!DEC$ ATTRIBUTES DLLEXPORT ::MATH
PRINT*, "Oops!!! I am ForTran manager..."
INTEGER SUM = A+B
PRINT*, "after sum in fortarnlangauge"
PRINT*, SUM
RETURN SUM
END SUBROUTINE MATH
C++ CODE(EXE)
#include <iostream.h>
extern "C" __declspec(dllimport)
int __stdcall MATH(int a , int b );
void main()
{
cout<<"iam checkimg the mixed langauage programming"<
|
|
|
|
|
You need to check if integers in C++ have the same number of bytes than in Fortran. In C++, it depends of the system...
Maybe try this:
extern "C" __declspec(dllimport)<br />
int __stdcall MATH(short a , short b );<br />
and this:
extern "C" __declspec(dllimport)<br />
int __stdcall MATH(long a , long b );
to force the compiler to use 2 bytes (short) or 4 bytes (long).
Hope this helps
|
|
|
|
|
Again I am facing the same problem.
|
|
|
|
|
Hi everyone,
I am quite new here, and actually no so old to C/C++ either.
Has for my problem:
I've been trying to build an OCX wrapper for 3 DLLs. The wrapper itself will also provide a bit of extra functionality of it's own, but
it is basically a wrapper.
So far no big deal. Actually it's even working without any problems. The problem, has I see it, is more of an aestecthics nature than anything else.
You see, although I profit from this by geting to keep and use the DLLs, I'm doing this for a friend and therefore it's suposed to be done a certain way. Which of course is exactly why he askaed for it in the first place, because he doesn't have the time nor the inclination to look into it himself, and also because he has never written a COM or OCX before.
The issue itself has to do with how you access the functionality of each of the DLLs. I am certain everyone here has at least once used the TreeView control. This control has a Nodes colection which can be used to perform certains task on all of the nodes, return a node count, or access an individual node. Now in my case I don't have sutch a collection, what I do have are methods, and some properties that come with the wrapper and one of the reasons for wrappers existance. But I do want them accessed like the Nodes property, meaning I need to implement one Property for each DLL, which will be used to expose that particular DLL functions and properties.
I've build the classes, no problem there. They all have Automation support. Properties and methods are all in place. So far no problem.
Now if this was a COM I wouldn't be asking the next two questions. I know it's probably something I should know, but the truth is I don't.
First : Since I am using Automation on my Wrapper Classes they actually become available for instantiation, which I don't want. So first question is, how do I stop this ?
Second : How do I implement my properties ? In a COM this is kind of easy, just a part of the Dispatch coding. However every attempt of doing it in the sameway has resulted in loss of Wizard assistance (not really a problem), lots of compiler warnings, and a fare number of crashes. So if anyone know how I can implement this I'd apreciate it, preferably with a pointer to some sample code, has I learn a lot faster that way. Just to remove any doubts, what I am trying to do is create 3 properties, one for each DLL, that will then be used to expose the properties and methods provided by that DLL. This would be done in the form:
Wrapper.DLL1.Function1
Wrapper.DLL1.FunctionN
Wrapper.DLL2.Function1
Wrapper.DLL2.FunctionN
Wrapper.DLL3.Function1
Wrapper.DLL3.FunctionN
Sorry, I don't mean to be annoying or anything by explaining it all like this, it's just I am always afraid I somehow mess up and can't get the message through.
I appreciate any help you can provide.
Best regards,
----------------
Lord Phoenix
----------------
|
|
|
|
|
I am developing an MDI application with a Tree View within the MainFrame Window and all MDI Child windows in the right side (within the MainFrame Window).
For each new node added to the tree view , an MDI child window should be created .Thus the GUI represents an Explorer style setup with nodes in the tree view representing the individual child windows..Can anyone help me in this regard.
|
|
|
|
|
How do i get a tooltip displaying the coordinate values of the client view area next to the cursor while moving the mouse?
|
|
|
|
|
Capture mouse when it is in your window.
Process WM_MOUSEMOVE notificaiton messages.
Decode lParam (already in client coordinates)
Update text in ToolTip window
Move your ToolTip window to desired location
Have fun
|
|
|
|
|
Hello,
I tried the below line to make my dialog start at a certain position, with certain size, and prevent the user from moving it afterwards.
SetWindowPos(&this->wndTopMost,StartXPos,StartYPos,DlgWidth,DlgHeight,SWP_NOSENDCHANGING|SWP_NOZORDER|SWP_SHOWWINDOW);
There is no problem with the start position and the size, but I can move it. Also there is some problem with CClientDC::LineTo() function. It sometimes draws after SetWindowPos is called, and sometimes not.
I also want to write a function to enable moving again.
Thanks in advance...
|
|
|
|
|
I'm sure there is an article in the Dialogs section somewhere about this, but off the top of my head...
Handle the WM_NCHITTEST message (OnNcHittest). If you want the normal behaviour, fall through to the standard behaviour.
If you want the dialog locked, return HTCLIENT.
...
ON_WM_NCHITEST()
...
UINT CMyDialog::OnNcHitTest( CPoint point )
{
if (m_bLocked)
return HTCLIENT;
return CWnd::OnNcHitTest (point);
}
Tada!
Iain.
|
|
|
|
|
WM_NCHITTEST did the trick.
thanks a lot!
caykahve
|
|
|
|
|
Override WM_MOVING and WM_SIZING to control how the window can be moved (or resized) by the user.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
i am encountering the following problem when making a dll in VC++ which contains functions using apache API.I have added the libraries available with apache installation to the input lib's.it is giving error in linking.
/*******
testfindna.obj : error LNK2001: unresolved external symbol _ap_log_error
testfindna.obj : error LNK2001: unresolved external symbol _ap_rwrite@12
testfindna.obj : error LNK2001: unresolved external symbol _ap_send_http_header@4
testfindna.obj : error LNK2001: unresolved external symbol _ap_set_content_length@8
testfindna.obj : error LNK2001: unresolved external symbol _ap_reset_timeout@4
testfindna.obj : error LNK2001: unresolved external symbol _ap_get_client_block@12
testfindna.obj : error LNK2001: unresolved external symbol _ap_hard_timeout@8
testfindna.obj : error LNK2001: unresolved external symbol _ap_should_client_block@4
testfindna.obj : error LNK2001: unresolved external symbol _ap_setup_client_block@8
Debug/testfindna.dll : fatal error LNK1120: 9 unresolved externals
Error executing link.exe.
*******************/
thanks in advance
pi
|
|
|
|
|
You need to link with the library the contains the mentioned functions (e.g., _ap_log_error ).
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
And, if you find you are already linking with the appropriate library, then you need to accomodate the function declarations like this:
extern "C" {<br />
#include "ApacheApiHeader.H"<br />
}
So the C-Style function names don't get mangled.
|
|
|
|
|
I am working in VC++ for the first time.I suppose adding the lib's to project settings->Links->input lib's and setting the path of additional lib's would be enough.i have added the provided lib's over there and still it is not working.if i have to do anything else please help me.
actually they have provided some '.so' files with the installation and these '.so's does contain the functions.but i don't have any idea as to if these can be used in windows or how to use it
|
|
|
|
|
ALOK
EVEN IF I USE _declspec(dllexport) ,it is of no use to define the exported function with extern"C".AS THERE IS NO INTERFACE PROBLEM BETWEEN DLL EXTENSION AND APPLICATION
but it is must in DLL Regular as the interface uses "C".IF I AM WRONG ALOK PLS RECTIFY IT.
I HAVE DOWNLOADED AN .EXE FILE USING OPENURL().NOW I HAVE TO DO SILENT SET UP(ie.,IF I DOWNLOAD A WINZIP FILE ,WHILE SETUP IT SHOULDNOT ASK ANY INFORMATION FROM USER)I USED CREATE PROCESS FOR AUTORUN BUT IT IS ASKING FOR THE SETUP OF THE FILE
|
|
|
|
|
on behalf of thatsalok,i m posting his reply...
sunit5 wrote:
EVEN IF I USE _declspec(dllexport) ,it is of no use to define the exported function with extern"C".AS THERE IS NO INTERFACE PROBLEM BETWEEN DLL EXTENSION AND APPLICATION
but it is must in DLL Regular as the interface uses "C".IF I AM WRONG ALOK PLS RECTIFY IT.
why are you concerning about 'C',when you are developing app in MFC?, just go for DEF file Solution with ordinal
sunit5 wrote:
I HAVE DOWNLOADED AN .EXE FILE USING OPENURL().NOW I HAVE TO DO SILENT SET UP(ie.,IF I DOWNLOAD A WINZIP FILE ,WHILE SETUP IT SHOULDNOT ASK ANY INFORMATION FROM USER)I USED CREATE PROCESS FOR AUTORUN BUT IT IS ASKING FOR THE SETUP OF THE FILE
you have to use custom zip extractor , search for zlib wrapper here
keep smilling.....b'coz smile is the shortest distance between people....
|
|
|
|
|
Hello,
I have an application that has a simple dialog with CListCtrl windows.
I have an Microsoft IME editor for Japanese with suitable Font enabled on my
machine.
But I want to application is supposed to display Chinese and Japanese each column in one CListCtrl.
for example first column language setting is Japenese, second column language setting is Chinese in CListCtrl.
Can anyone point me as to how I can achieve this ?
Thank You
|
|
|
|
|
Hi!
I have an application that starts a service application when it starts. This works when I start the application in an admin account, but if I run the program in a non-admin account I'am not able to start the service with the method StartService().
Here is my code:
void startmyService()
{
SC_HANDLE myManager;
SC_HANDLE myService;
myManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
myService = OpenService(myManager, "myService app", SERVICE_ALL_ACCESS);
if (myService == NULL)
{
return false;
}
if (!StartService(myService,0,NULL))
{
return false;
}
CloseServiceHandle(myService);
return true;
}
|
|
|
|
|
Your account does not have the privilege to start a service.
Impersonate an account that has the privilege and then RevertToSelf when done.
|
|
|
|
|
I need following information from Windows Machine.
1.Total CPU utilization
2.Total CPU user time
3.Total CPU sys time
4.Total CPU idle time
5.CPU load average (1, 5, 15min)
6.CPU run queue length
7.# of Active processes
8.Interrupts per second
9.System calls per second
10.CPU utilization of the custom process 1, 2, …
Which API can use to get the above info? Pl Give an Example.
Advance Thanks,
|
|
|
|
|
Well, maybe most of information that you need can be retrieved from the performance counters.
I published a sample How to get CPU usage by performance counters (without PDH)
. In that projects i wrote a general class that gets counters by object index,counter index and instance name.
Look at my code how i use that class and try to use it for retrieving more information.
|
|
|
|
|
hiii....
this is very interesting......wht i am trying to do is to RECREATE a window (it can b any apllication window) by grabbing all its properties n properties of all its childs..... on another REMOTE TERMINAL......
but i hav had limited success till now....means i am able to recreate only some of the windows.......i hav tried creating the NOTEPAD and CALCULATOR windows but hav failed in the process...
i am using the CreateWindowEx function do it...and other callback functions to obtain the properties...
can neone plzzz suggest any reasons why this is not possible??? or is it?
i need some urgent replies for this....any help is welcome...
regards,
kedar.
|
|
|
|