Visual C++ :: How To Start Process Without Loading Global Hook

Apr 21, 2014

I had created a global hook by SetWindowsHookEx with WH_CALLWNDPROC. It is used to create a new toolbar button in specific window in the specific (3rd party) program (named HOOKEE.exe for example), and it works perfectly fine most of the time. Normally HOOKEE.exe is launched by double clicking the shortcut icon on desktop. But this program could be also launched in another way (provided by the provider of HOOKEE.exe), with this new way, HOOKEE.exe is by conhost.exe (on Windows 7), and then I could see (via ProcessMonitor) my hook is loaded by conhost.exe, but not the process HOOKEE.exe. In my understanding global hook would be loaded by whatever process, I have no idea on the exception, and what conhost.exe does to the HOOKEE.exe.

View 13 Replies


ADVERTISEMENT

C/C++ :: How To Hook Function From Same Process And Get Address Of Caller Function

Apr 27, 2013

I need to do it to avoid calling a function of my process from injected code.

So would like to hook this function to check whether the call is from the current module or it is from an external module, then I compare the address of the instruction who did the call with the module address range.

View 1 Replies View Related

C Sharp :: Programmatically Start A Process And Enter Required User Name And Password?

Apr 21, 2013

Using C#, is it possible to programatically start an application and enter a required user name and password

View 2 Replies View Related

Visual C++ :: Application Won't Start Once Installed On Other Computers

Sep 13, 2012

I use standard libraries and INNO Setup, wich is a free setup file creator.

I succeeded in adding NetFrameWork 4.5 installer into the setup (it runs it after installation, and before running my software (named GOFINDER).

Now, i remember that this happened to me, but after three months of programming, mine used to start and still does. But I know it sometimes doesn't start, and I don't know why exactly.

I checked to make sure that I needed only FrameWork 4.5.

But maybe it is because of Visual C++ Runtime wich is not added upon setup.

I will try to check this after posting cause this has just popped up in my mind.

I'm asking you how can I Make sure, that distributing my software won't do that anymore.

Is it because my application file is not set on Run as Administrator?

Cause normally, it opens without this necesity, except as a Shell (well I have to check back but I think it does if I check on the run as administrator checkbox.

The problem is not really with InnoSetup, but I also would like to know how I can check that box automatically upon setup.

they say they have a documentation but I don't find it on my computer.

And... why would it start on my computer, and not on my beta-testers's one?

View 3 Replies View Related

Visual C++ :: Loading Bitmap In Particular Way?

May 25, 2013

I have a function that essentially takes a screen shot and saves a pointer to it as a structure. I would like to use the same structure for bitmaps that I load from files.

Code:
typedef struct _BITMAPCAPTURE {
HBITMAP hbm;
LPDWORD pixels;
INT width;
INT height;
} BITMAPCAPTURE;
BOOL CaptureScreen(BITMAPCAPTURE* bmpCapture) {

[code].....

The handle to the bitmap, as well as the width and height are all easy enough to get but I'm unsure of how to get the pixels.

View 2 Replies View Related

Visual C++ :: Auto Start Function After Cdialog Was Shown?

Nov 19, 2013

I want to start a time intensive function after showing a modal cdialog. How can I do this?

Starting the function in OnInitDialog do not work because the dialog is not shown, then.

View 10 Replies View Related

Visual C++ :: Loading A File And Indexing Line Starts

Jun 14, 2013

I've spent some time trying to performance test various methods of loading / accessing a file, either into memory or through a memory mapped file, but I am having some trouble.

FILE * pFile;
std::ifstream ifs;
MapViewOfFile

I'm have trouble because Windows appears to cache the file, so I am getting very mixed results. Sometimes a huge file (100's MB's) will load quickly, other times almost instantly.

How to stop Windows from doing whatever it's doing, so I can see the real time taken to load/access a file from disk?

View 8 Replies View Related

Visual C++ :: Cannot Use Global Scope Max Function

Jan 30, 2013

The compiler "forces" me to use the std::max method, I cannot override it even when writing ::max in my code.

View 4 Replies View Related

Visual C++ :: Global Variable Scope

Jun 15, 2014

//I dont understand this why does "<< "
The value of global now is: " << global << "
";" is equals to nine

#include <iostream>
int subtract (int a, int b);
int global = 5;
int main(void) {
using std::cout;
int a, b;

[Code] ....

View 1 Replies View Related

Visual C++ :: Static Variables Local Or Global?

Mar 10, 2014

I came across the following code today and I was a bit surprised that it worked:-

Code:
std::string func_A () {
static std::string x;
if (!x.empty())
return x;

[Code] ....

I've simplified things slightly - but the basic point is that both functions are in the same source file and they both have a static std::string called 'x'. Being static, I guess they aren't (strictly) local variables. So how does the compiler know that they're different entities? Does it encode their signatures using the function name or something like that? If I call each function separately I do seem to get the correct string...

View 5 Replies View Related

C# :: External Window Paint / Draw Hook?

Jan 13, 2014

Is there any way that I can call a function/receive an event whenever an external window (not any of my forms) repaints/draws?

If you create a GDI+ graphics object and give it the HWND of another window that refreshes a lot like a web browser, anything with animated graphics, your draws and the windows draws are out of sync which creates an intense flicker effect.

Googling this issue only brings up results for handling when my own form repaints...

My idea is that I could just redraw my GDI stuff whenever the form redraws, this is indeed possible?

View 9 Replies View Related

C++ :: Hook HW Interrupts In Flat Memory Mode With DOS32/A

Jul 23, 2012

I have a question about how to hook HW interrupt in flat memory mode...

@ about my application...
- application is created by combining Watcom C and DOS32/A.
- application is written for running on DOS mode( not on OS mode )
- with DOS32/A now I can access >1M memory and allocate large memory to use...(running in flat memory mode !!!)

@ current issue...
- I want to write an ISR(interrupt service routine) for one PCI card. Thus I need to "hook" the HW interrupt.
- Ex. the PCI card's interrupt line = 0xE in DOS. That means this device will issue interrupt via 8259's IRQ 14.

But I did not how to achieve my goal to hook this interrupt in flat mode ?

@ resource I found...
- in watcom C's library, there is one sample using _dos_getvect, _dos_setvect, and _chain_intr to hook INT 0x1C...
I tested this code and found OK. But when I apply it to my case: INT76 ( where IRQ 14 is "INT 0x76" <- (14-8) + 0x70 )
then nothing happened...
* I checked HW interrupt is generated but my own ISR did not invoked...

Do I lose something ? or are there any functions I can use to achieve my goal ?

View 2 Replies View Related

Visual C++ :: Creating Different Process And Share Data Between 2

Dec 8, 2014

I want to create 2 different easy processes in C++ 1st and then i wanted to share data between these 2 processes.

View 7 Replies View Related

Visual C++ :: Process Wider Date Range Than COleDateTime

Apr 24, 2013

I have a ULONGLONG variable uDate which express the number of dates starting from 0001-01-01, up to 9999-12-31. Now I want to convert it into a string like this

"yyyy-mm-dd"

However, the COleDateTime can only express the date from 100 to 9999, smaller than what I need. So are there any third-party classes or libraries that can express this. Or make the conversion from uDate to CString?

View 1 Replies View Related

Visual C++ :: Create Process And Wait For Input Idle

Feb 13, 2014

I have a problem with creating a process and waiting until the main window of the new process was shown. I thought I can wait for it with

WaitForInputIdle(pi.hp,INFINITE);

But when the function returns, the handle of the main window of the new process is not available. If I include also a ::Sleep(), the new window is available. Sleep is a bad solution. How can I do it?

View 3 Replies View Related

Visual C++ :: How To Retrieve Window Proc In Process Running In Other User

Apr 25, 2014

I am encountering a problem on retrieving the Window Proc of a window that running in a process with another user.

For example, I have logon windows with domainuser1, and run the following command as:

runas /profile /env /user:domainuser2 C:WindowsSystem32calc.exe

And then the Calculator is shown in domainuser1 desktop, but the process is running in domainuser2 account.

When running Spy++ (either wither domainuser1 or domainuser2) to view the calculator window, the Windoe Proc field is shown 'Unavailable' I also try to call GetWindowLong against this window, it will always returns NULL.

I am just wondering if it is possible to retrieve the Window Proc of the window running in a process of another account, is is possible?

View 9 Replies View Related

Visual C++ :: Application That Process Multiple Files Through Command Prompt Call

Dec 22, 2012

I am making an application that processes multiple files (typically > 500) through a command prompt call. The way I start the command prompt app is by looping using a call to CreateProcess for each file that is to be processed. It works fine, except that I somehow loose 'connection' to my app so that

1: Windows says that the app. is 'Not Responding'
2: The Cprogress bar in my app is not updated before all files have been processed, even though there is a CreateProcess call and a Cprogress.StepIt() from the app for each file that needs processing.

I somehow suspect that the CPU gets swamped... I do not want that Windows starts to say that my app is 'not responding' and I want my Cprogress dialog bar to update according to the number of files that are progressed through.

I wonder if multithreading is the OK way to go instead of just kicking of series of CreateProcess calls? Maybe my CreateProcess is not ending correctly? It seems as if my app is 'not regaining control' before very late. The app never crashes though.

My CreateProcess code is listed below, maybe there can be a problem with it, or maybe I should do things in a different way? My app basicaly works as it never crashes, but with above mentioned problems it is NOT a pro solution...

void CMultiFilerDlg::ProcessFile(CString pdfFile) {
int i=0;
DWORD ProcID;
// Open file in text mode:
STARTUPINFO si;
PROCESS_INFORMATION pi;
char cmdArgs[2052];

[Code] .....

View 6 Replies View Related

C++ :: How To Start Using Ncurses

Sep 3, 2013

It's written here: URL....But those links don't work. I can't understand how to start programming using ncurses.

View 9 Replies View Related

C Sharp :: Why Start From 1 Not From Zero

Jul 16, 2013

char []c =null;
c=new char[1]; 

why star from [1] not from [0]???

View 1 Replies View Related

C :: Parallel Port Where To Start

Jan 1, 2014

I started writing in c because I want to control relays with the parallel port, or anything else. Doesn't really matter what I use I just need to know where to start. Trying to send and receive data from the outside world with c programming on a GNU/Linux os? If so any good some what up to date resources online?

View 5 Replies View Related

C :: Start Stop Watch

Feb 25, 2013

I'm new to C programming and am quiet lost, create a program that takes a start and stop time and prints the passed, or show me where I can find the information needed?

View 6 Replies View Related

C :: Getting A Loop To Return To Start

Feb 21, 2013

How would I go about getting a loop to return to the start?

View 2 Replies View Related

C++ :: How To Start Writing Game App

Oct 23, 2013

How do i start writing Gaming app using C++. What is the environment required. I have mingw compiler installed on Windows8.

View 4 Replies View Related

C++ :: How To Start A Printer Queue

Nov 30, 2014

Write a program to simulate a printer queue (priority queue or heap – Bentley article has code) where 3 printers are “fed” by this queue. Each print job has an unchanging priority and higher priority jobs go first (although once started, a job isn't stopped to let a higher one go). For each unit of time, there is a 26% probability that a job will be added to the queue and all jobs take 8 time units to complete. Print job priorities are between 5 and 100. The queue opens 20 time units prior to the start of printing for adding print “jobs”. A print “day” is 1000 time units. The output from your program is:

1) A list of jobs completed with their priorities for each printer

2) A list of jobs not completed (if any).

#include <iostream>
#include <cstdio>
#include <cstring>

[Code].....

View 1 Replies View Related

C++ :: Add Prompt At The Start Of Program?

Jan 28, 2013

i want to add a prompt at the start of my program which ask a user to enter its password wat will be its syntax it is confusing me alot i have written this code but its gving me a problem

int security(char *num)
{
char pass[10];
ifstream file("pass.txt", ios::in);

[Code].....

View 3 Replies View Related

C++ :: Random Value At Every Start Of Program

Dec 29, 2013

My motive is to get random variable at every start of program. So it does not show same sequence when it run again and again ....

Code:
int main() {
srand( time ( NULL ) );
cout<<rand();
}

When I run this program in code::block the following program is opening with error in new tab called TIME.H

Code:

#ifndef_TIME_H_
#define_TIME_H_
/* All the headers include this file. */
#include <_mingw.h>

#define __need_wchar_t
#define __need_size_t
#define __need_NULL
#ifndef RC_INVOKED
#include <stddef.h>
#endif/* Not RC_INVOKED */

[Code] .....

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved