Visual C++ :: How To Register ATL Exe COM

Apr 4, 2013

I created an EXE COM server with ATL.

and from the client (DLL COM with ATL) i want to create an instance of the EXE (CreateInstance(CLSID of the EXE)).

how do i register the exe so that i know the path to the com server.

View 2 Replies


ADVERTISEMENT

C/C++ :: How To Use Register Selectively

Feb 15, 2013

I am looking for a way to create a virtual registry and force only certain programs to use this one? Or to create a virtual Registry but which i can shut down (this registry will be only used while i activate it)?

Or redirect all querys to another place in the registry I've seen similar issues. But there is no answer how to use the register selectively!

View 16 Replies View Related

C :: Using File As Accumulator Register

Dec 4, 2013

I need to use a file as an accumulator of very large size.

I want to write one bit at a time. I have an iteration engine that applys so logic to either add 1, do nothing, or subtract 1 from the array, but it has to be much larger when dealing with multi-GB files.

So I either need to & the 8bit to 4K array value to a file or write it it one bit at a time.

But it is not that I want to write sequential bytes, I need the file to be written so it acts as accumulator.

I know its in front of my face, but I need to rethink this

View 1 Replies View Related

C++ :: How To Read Pixels From X / Y Coordinate Using VGA Register Values

Aug 4, 2013

How to read pixels from an x,y coordinate using the VGA register values?

byte readVRAMdirect(VGA_Type *VGA, uint_32 start, uint_32 offset) //Used in 256 color mode!
{
if (!VGA->VRAM_size) return 0; //No size!
return VGA->VRAM[SAFEMOD((start*4)+offset,VGA->VRAM_size)]; //The full protected offset!

[code]....

getVRAMScanlineStart(VGA,y) gives the offset register multiplied by 2 (shl 1), multiplied with the current memory address size (byte, word or dword) multiplied by the scanline. 256-color mode is already working. GETBIT gives a bit #(0-7) of a specified byte.

writeVRAMplane & readVRAMplane are used by the CPU to write data to VRAM (address 0xA000:xxxx-0xBFFF:xxxx), determined by the memory read and write modes(working) and the odd/even, planar or chain4 enable mode (working).how to get the 16 color and interleaved shift mode working?

ZIP with screen captures: URL....

View 2 Replies View Related

C++ :: Exceeded 32bit Register Value Exceeds 4 Bytes

May 28, 2014

My question, What happens when with the 32 bit register value exceeds 4 bytes while programming in c++? Im interested in encryption.

Im programming and doing some calculations. The hex value "0xFA062F2F" multiplied by "6D" sends it over "0x6A74A21703", which exceeds 32bit.

My problem is while programming in C++, I do some calculations such as above, and I get the hex value "0xC0000001" which should be "0x6A74A21703". I made sure that I use long long as my interger type.

How can I overcome this problem with programming.

View 3 Replies View Related

C++ :: Cash Register Program - Reinitializing Values With Subprograms

Dec 7, 2014

I'm trying to make a cash register program, but first I need to reinitialize ones, fives, tens, and twenties to their correct dollar amount. However, whenever I try to pass the user inputted values to the function that calculates the correct dollar amount, it just prints the same number.

Here's my code:

#include <iostream>
#include <string>
using namespace std;
//dollarAMT - recalculates the actual dollar amount
void dollarAMT(int ones, int fives, int tens, int twenties){

[Code] ....

View 2 Replies View Related

C/C++ :: Cash Register Program - Reinitializing Values With Subprograms

Dec 7, 2014

I'm trying to make a cash register program, but first I need to reinitialize ones, fives, tens, and twenties to their correct dollar amount. However, whenever I try to pass the user inputted values to the function that calculates the correct dollar amount, it just prints the same number.

Here's my code:
#include <iostream>
#include <string>
using namespace std;
//dollarAMT - recalculates the actual dollar amount
void dollarAMT(int ones, int fives, int tens, int twenties){

[Code] ....

View 1 Replies View Related

Visual C++ :: PIC To PC Using MFC Visual Studio Through Serial Communication

May 28, 2014

The project is about reading data from PIC and display the data on the dialogue created by the MFC GUI of Visual studio 2010. There are 4 data need to be displayed (2 weight and 2 angle). the data will be display on the edit control box on the dialogue.

I have try to solve the COMPort and Readdata issues many times, but I'm fail. I have read many sources and implement the source codes... They are never work....

The detail about the issues that I need to solve is clearly mentioned on the main dialogue.cpp. Take a look to an uploaded zip file that I have attached.

View 6 Replies View Related

Visual C++ :: Cannot Seem To Set Var

Nov 8, 2012

What I'm trying to do is get the selected folder value put into my dirlocation var.

Code:
private void dirLocation_Click(object sender, EventArgs e) {
FolderBrowserDialog fdb = new FolderBrowserDialog();
fdb.Description ="Please choose the directory your .rlt files are located in";
if (fdb.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
dirLocation = fdb.SelectedPath;
}

Is this how you do it? I keep getting an error like Cannot implicitly convert type 'type' to 'type.

View 5 Replies View Related

C++ ::  How To Use QT With Visual Studio

Aug 15, 2014

I heard that you can't use it with express, but that doesn't seem right... Can you use it with Codeblocks, at least? I just hate the Qt Creator IDE. I don't like the UI... all I want to do is code Qt. I don't care much for the GUI editors.

View 10 Replies View Related

Visual C++ :: Create MFC OCX Using DLL

Aug 28, 2014

I am trying to create a OCX from a C++ dll., Here's the scenario I have a C++ dll and this dll needs to be called in VB.net program my boss want's me to create an OCX out of this.

C++ dll and use it in a VB.net class library, apparently I have created an OCX but it requires a form but the VB.net program is a class library.

View 5 Replies View Related

Visual C++ :: How To Convert IP To Hex

Sep 27, 2012

I don`t known how to convert IP to hex .

In this link [URL] .... . I see hex IP : Hex IP 0x462a1779

I want to convert IP "70.42.23.121" to "0x462a1779"

Code:
#include <winsock.h>
#include <windows.h>
#include <stdio.h>
UINT32 ip_to_hex(UINT32 ip_add) {
UINT32 ip_hex;
//code convert ip to hex
return ip_hex;

[Code[ ....

And this is result : 7b 1e 80 and a , not 0a

Further i think we must separate each octect by a (dot) . , Then convert decimal to hex.

View 6 Replies View Related

Visual C++ :: Using COM Without Registering?

Mar 5, 2013

In a C++ project, I need to call a C# created COM object (as a .dll)

Is there a way to use such a COM object without having it be registered in the registry?

The C# COM dll is just a "go between" our C++ code and a .NET library, there's no "COM contract" of any kind, the COM interfaces change each version. The fact it's COM and needs registration is annoying because it makes it hard to have multiple versions of our software installed (needed under some circumstances) and running at the same time.

I'd like a way to not have any registration at all. And just be able to do a LoadLibrary("c:TheRightPathcom.dll") of the right dll and then get going from there.

View 14 Replies View Related

Visual C++ :: Value Of Pointers

Feb 5, 2013

I'm trying to figure out the value of pointers after the following code snippet

Code:
int s[8] ;
int *iptr1, *iptr2 ;
int **iptr3 ;
for (int i = 0 ; i < 8 ; i++)
s[i] = 7 - i ;

[Code] ....

I need to find what the value of iptr1, iptr2, and iptr3 are after the code is executed.

View 3 Replies View Related

Visual C++ :: OpenCV In MFC App?

Feb 5, 2014

I have a C++ app that uses OpenCV. Currently i am statically linking the OpenCV libs into my app. This is adding an extra overhead of 6+ MB.

i would like to remove some of the features that i am not using in OpenCV. The features am using are,

Capture frames from Webcam.

Face detection.

Image formats (JPEG, PNG).

Image rotation & resizing.

Is it possible to remove other features and trim down the libs?

My C++ app is developed in Visual Studio 2012.

View 1 Replies View Related

Visual C++ :: Using CSplitButton In VC6?

Dec 5, 2013

Is there any chance to use CSplitButton in VC6 ?

I had tried to use something appropriate founded on CP, but they are using DrawItem, and I had problems with windows style, and I had tried to make myself one, overriding OnPaint, but I front with flickering (I put the sample below)... so, I wonder if I could get (from somewhere) CSplitButton and add to my project ... if you say that I could, can you provide me the CSplitButton source code ? I mean, only .cpp implementation file ...

View 1 Replies View Related

Visual C++ :: Map With Two Key Values?

Mar 29, 2013

I have an assignment where I need to go through all the files in a folder. For each file I need to know each unique file extension, how many files for each unique file extension, and the total size for each unique file extension. I have to be able to sort through this using either the file extension or the total size of the file extension. The first thing I thought of using was a map. This will keep track of each unique file extension and the amount of times that file extension was found. How do I now associate the total size of the file extension to my map? So for example I need the output to be something like this:

Using file extension for sort
.cpp : 1 : 3400
.exe : 3 : 3455600
.mp4 : 25 : 200000404

Using total file extension size for sort
.mp4 : 25 : 200000404
.exe : 3 : 3455600
.cpp : 1 : 3400

Here is the code I have so far:

Code:
#include <iostream>
#include <filesystem>
#include <map>

[Code]...

I was thinking of somehow using a class to implement this, but don't know how to go about doing that. A

View 1 Replies View Related

Visual C++ :: What To Do With OnNewDocument

Nov 29, 2012

I got a program from somebody. He had its initialization to run his program but never bothered to save the data for later use. Now I wanted to add the New, Open, Save, and Close to it, so I add OnNewDocument ahead of his program. It crashed every time I ran it.

Shall I include his initialization in the OnNewDocument? If I can not separate the initialization part from his code, e.g., they come in as dll, what shall do?

View 7 Replies View Related

Visual C++ :: How To Use C# With Excel

Jan 2, 2013

Is it possible to create an app that can be saved on my desktop that can be used with an excel file that is saved on my desktop? I have opened VS 2010 and I have created a form design that has a button for every sheet name in my excel file. All of the sheet names are hidden with the exception of one. When a button is pressed on the c# form, I would like for that sheet to be shown in excel. Then once the updates have been made to that sheet in excel, I want a button to be at the top of the excel worksheet that will hide that worksheet again and return to the form c# form...can that be done?

View 2 Replies View Related

Visual C++ :: Compiling On X86 CPU?

Apr 30, 2015

I'm compiling some open source code (originally written for Linux / gcc) which uses the following line to determine if a particular section is being compiled for an x86 processor:-

Code:
#if ( defined(__x86_64__) || defined(__i386__) )

neither of those seems to be defined by my ageing compiler (VC++ 8.0). What would be the equivalent for building with VC8 ?

View 6 Replies View Related

Visual C++ :: How To Set Focus After Using Alt Tab

May 22, 2014

Using mfc I have an application where I'm not allowed to use a mouse and alt+tab will be regularly used. Using alt+tab to come back to my application kills the focus in the view. Once my application comes back to the foreground how can I set the view as the focus?

View 3 Replies View Related

Visual C++ :: Lib Using OLE DB Template

Mar 19, 2013

My question contains two projects that are under the same solution.

Project_1: I have created a dll where I use inside the project, OLE Db Template. In the project, I use this code.

class MyClass {
public:
LONG _value1;
SHORT_value2;
BEGIN_COLUMN_MAP(Accessor)

[Code] .....

Project_2: Is a project testing the Project_1.

- I want to call one of the exported functions.
- In Linker/Addional Dependencies, I have added the .lib
- In Linker/Additional Libray Directories, I have added the directory where is the lib.
- In C/C++/General/Additional Include Directories, I have added the directory on project 1. I did that because I want to #include a header in Project_1. But, when I do that, I get:

Error1error C3646: 'COLUMN_ENTRY' : unknown override specifier
Error2error C2059: syntax error : 'constant'
Error3error C3646: 'COLUMN_ENTRY' : unknown override specifier

I have done it several time with other projects, but the first time with OLE DB Template. atl90.dll is registered.

View 1 Replies View Related

C++ :: Visual Studio Linker

Jan 4, 2013

I wrote a routine in one C++ file and I decided to break it up into some smaller more manageable C++ files. When I copied the variables out of the first one and into the new smaller file (same solution), everything compiles fine but I get a ton of linker errors saying the variables have already been defined in another (the previous) file. Using Visual Studio 2008.

View 5 Replies View Related

Visual C++ :: Add To Listbox Thread

Feb 15, 2015

Startthread get called to launch to update list box.

a)is it the only way to pass string to the PostMessage?. my concern is that allocate using new in each iteration each time slows it down a bit.

b)does OnAddToListBox look memory leak free?.

c)What is the best way handle m_pThread at the end?. Any way to improve it?.

Code:
UINT CMyDlg::Dump(LPVOID lparam) {
HWND *pHndl = static_cast<HWND *>(lparam);
char buffer[200];
for (int i = 0; i < 100; i++) {
sprintf_s(buf,"user %d, data %s",i, "Connected");

[Code] ....

View 8 Replies View Related

Visual C++ :: Insert JPEG In CPP

Sep 27, 2012

I'm very good with hmtl now i want develop with C++ i need to insert jpeg into .cpp and insert movie flash in file .h ....

View 14 Replies View Related

Visual C++ :: Getting Rid Of (Save Changes To Untitled)?

Oct 10, 2013

I have tried everything I can think of to get rid of the 'Save changes to Untitled?' message box that appears every time my SDI split app tries to load a new file. The problem is that the message appears inappropriately, both when no previous document has been loaded or should exist, and even after File / New has been envoked. I have attached a small demo program to demo the problem. Inspecting the SpVwTrDoc.cpp NewDocument and OnOpenDocument, and elsewhere, you will see that using SetModifiedFlag(FALSE); has no effect.

View 10 Replies View Related







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