|
Hi,
I'm trying to deploy an application written in C++, C++/CLI and C# on pc's that do not have VC2005 installed. I am having issues with assemblies loading, in particular the C++/CLI one and am getting FileLoadException when it tries to load the dll. I know I can get round this problem by running Vcredist_x86.exe - this sorts it out and sets the pc up so that it can run VS2005 apps.
My problem however is that not everybody is able to run this exe as you need admin rights as it's an installer, so I just want to be able to ship the appropriate dlls with the application. These can be found in the folders in \Program Files\Microsoft Visual Studio 8\VC\Redist\x86\ in my installation. However, even with these dlls present in the application directory (both within their directory structures and just all copied straight into the root directory), I'm still getting the FileLoadException when trying to load the C++/CLI dll. Does anyone know what else Vcredist_x86.exe does, i.e. what other dlls it puts on the users pc. I feel like I've tried all avenues but am not getting anywhere...
There's a lot of detail about this at http://www.codeproject.com/cpp/vcredists_x86.asp but I've tried it all and the only way I can get it to work is by running the VcRedist_x86.exe which unfortunately isn't an option.
Thanks, Stuart
|
|
|
|
|
More info: Deployment (C++)[^]
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
In my project, i have to transfer some data from a gprs modem to a pc. So I just want to learn that, Is TCPListener component sufficient for obtaining the data sent by GPRS modem over GPRS channel?
|
|
|
|
|
Hi to all, I'm new to vc++ and I've read a bit on how to create a new form and load it (make it appear on screen). But i have this code and its corresponding error and would be glad if someone could point me in the right direction.
There's three forms, Form1 (login form) and gymMain a main interface. So what I tried to do is first load the application with gymMain and make its Visible state FALSE, next load Form1 (login) and upon confirmation of input, close Form1 and make gymMain visible. Now I try this with the below code and the erorr is shown below. All help/suggestions appreaciated.
regards
PS: I'm prety sure I used the header files appropriately but one never knows, ...
--------------------------
code for Main application:
--------------------------
// GymManager.cpp : main project file.
#include "stdafx.h"
#include "Form1.h"
#include "gymMain.h"
#include "NewMember.h"
#include "search.h"
using namespace GymManager;
//using namespace Form1;
//using namespace gymMain;
//using namespace NewMember;
//using namespace search;
[STAThreadAttribute]
int main(array ^args)
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
// Create the main window and run it
Application::Run(gcnew gymMain());
return 0;
}
----------------------------------------
code for gymMain:
----------------------------------
#pragma once
#include "NewMember.h"
#include "Form1.h"
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::Globalization;
using namespace GymManager;
namespace GymManager {
///
/// Summary for gymMain
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
///
//
//// code for constructor and object declarations and initializations
//
#pragma endregion
private: System::Void btnNewM_Click(System::Object^ sender, System::EventArgs^ e) {
// gymMain::Visible = false;
// GymManager::NewMember ^newM = gcnew GymManager::NewMember;
// newM->Show();
}
private: System::Void gymMain_Load(System::Object^ sender, System::EventArgs^ e) {
//load login page and make main page invisible
this->Visible = false;
GymManager::Form1 ^login = gcnew GymManager::Form1;
login->Show();
//display clock
DateTime^ dt = DateTime::Now;
String^ date;
date = dt->ToString();
lDateShow->Text = date;
}
};
}
-------------------------------
error messages displayed:
-------------------------------
c:\documents and settings\and_one\my documents\visual studio 2005\cs208\gymmanager\gymmanager\gymMain.h(282) : error C2039: 'Form1' : is not a member of 'GymManager'
c:\documents and settings\and_one\my documents\visual studio 2005\cs208\gymmanager\gymmanager\gymMain.h(282) : error C2065: 'Form1' : undeclared identifier
c:\documents and settings\and_one\my documents\visual studio 2005\cs208\gymmanager\gymmanager\gymMain.h(282) : error C2065: 'login' : undeclared identifier
c:\documents and settings\and_one\my documents\visual studio 2005\cs208\gymmanager\gymmanager\gymMain.h(282) : error C2039: 'Form1' : is not a member of 'GymManager'
c:\documents and settings\and_one\my documents\visual studio 2005\cs208\gymmanager\gymmanager\gymMain.h(282) : error C2061: syntax error : identifier 'Form1'
c:\documents and settings\and_one\my documents\visual studio 2005\cs208\gymmanager\gymmanager\gymMain.h(283) : error C2227: left of '->Show' must point to class/struct/union/generic type
type is ''unknown-type''
luhfluh
|
|
|
|
|
As said earlier Form1 doesn't seem to member of GymManager , which is assumed by you while coding.
|
|
|
|
|
If I have a populated dataGrid in visual c++, how can I get values from the dataGrid without going to the underlying dataSet.
Is there a way to use dataGrid->currentRowIndex to reference the row and then return the value from a given column.
Thanks!!
Kim
|
|
|
|
|
You need to populate the dataset...
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
How do I perform a global hit test?
I want to translate the mouse coords to a global hit test result which will hopefully give me the window handle that the mouse is over and if possible, if I am over the title bar/menu/status bar etc.
http://www.asura.co.uk
|
|
|
|
|
Oops, wrong forum ... sorry!
http://www.asura.co.uk
|
|
|
|
|
Hi everyone,
I set my main form's icon. When I tested it in debug mode, a System.Resources.MissingManifestResourceException gets thrown by at the point where the forms designer code attempts to load the icon:
this->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"$this.Icon")));
When I view the .resx file in VS however, I can see the icon is there. Does anyone know what the cause of this problem could be?
TIA,
Ralph
|
|
|
|
|
I discovered that my form was declared inside a namespace `Configuration1'. The name of the project is `Configuration'. Changing the namespace to `Configuration' seems to have solved the problem.
|
|
|
|
|
II would like to capture the word (text) under the mouse from any program in real time. If the mouse pauses over a word, I would get a callback or notification that includes the actual text. This would not be limited to my own program. I want to catch the text on any program.
I know I could watch the clipboard and use cut or copy to get the text from another app.
I want to make a program that checks the word against a local word table so that my program window can show information about the word the mouse is over.
chvt_smpt
|
|
|
|
|
Are you using C++/CLI, or are you in the wrong forum ?
there's an API called GetWindowAtPoint ( from memory ), which would allow you to call GetWindowText. Getting the word under the mouse is a little harder.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Looking for someone who has basic knowledge of writing a AMX plugin for CS 1.6
Basically it has to take a command the admin does and store it in a text file on a server to check for proof of admin abuse.
|
|
|
|
|
What's CS 1.6 ? It supports .NET ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Counter-Strike 1.6.
The admin commands are input through Steam at www.steampowered.com
I tried to google to see if Steam supports .NET but nothing came up
-on the other hand-
There is a "guide" at www.amxmodx.org on the constants and such. They also have downloadable plugins and you can open the .sma files in notepad. The following is a link to plugins that record stats:
http://www.amxmodx.org/compiler.php?mod=2&cat=3&plugin=&author=&go=search[^]
So pretty much when admin uses: amx_kick or amx_slap or amx_ban it needs to record his STEAM id and write it to a text file in the database.
|
|
|
|
|
Hi all,
I'm having trouble with my multithreading. I am doing video capturing so have and infinite loop in which frames are captured, unfortunately while the thread is running the class (containing the loop) the UI freezes.
I'm wondering if anyone knows how i am able to create a simple worker thread which executes the class and keeps the UI responding?
Here is the code that executes the class. I have attempted to create what i thought was a worker thread, with no avail.
<br />
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {<br />
<br />
ThreadStart^ t1 = gcnew ThreadStart(this, &FYProjV4::Form1::detectThreadStart);<br />
Thread^ recogThread = gcnew Thread(t1);<br />
<br />
recogThread->IsBackground = true;<br />
recogThread->Start();<br />
<br />
<br />
}<br />
<br />
private: System::Void detectThreadStart() {<br />
<br />
if(reportBox1->InvokeRequired == false)<br />
{<br />
<br />
FaceRecognition recogTools;<br />
recogTools.StartRecognition(reportBox1, faceBox1);<br />
}<br />
else<br />
{<br />
<br />
this->BeginInvoke(gcnew DetectThreadStartDelegate(this, &FYProjV4::Form1::detectThreadStart));<br />
this->EndInvoke(result);<br />
<br />
}<br />
<br />
}
I am in a real rush to get this sorted so any suggestions would be greatly appreciated.
Also, Removing the loop is not an option and it must be in managed c++.
Thanks for your time
|
|
|
|
|
|
this->BeginInvoke causes the call to be executed on the main thread, so you're still blocking the main thread while StartRecognition runs (and the worker thread just waits at this->EndInvoke).
You have to run the code that takes a long time on the separate thread and Invoke only for the parts that update the UI.
|
|
|
|
|
With VS2005, I'm having a problem figuring out how to get new directories (from dirctx SDK Feb 2007) to be added to the standard ones.
I have tried Tool / Options, Project Options "Additional Included Directories" (/I), and cannot get it to work.
Clearly I'm missing the boat on this one... help.
|
|
|
|
|
You're trying to use managed DirectX, or are you in the wrong forum ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
OMG, sorry was totally in the wrong forum.
I got it solved anyways, thanks.
|
|
|
|
|
How do I disable the com1 port from being used by the debugger? I am writing a Mobile 5.0 application which uses com1 and it is in conflict with the debugger. Thanks.
|
|
|
|
|
Do you want to use C++/CLI, or just vanilla C++ ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello,
Under certain conditions, I would like my C++/CLI Windows Forms application (i.e. its main form) to show up maximized in the foreground, even if it is minimized or under other windows. Unfortunately, BringToFront and Focus functions don't help.
I have even imported and called the SetForegroundWindow API, with no effect:
[System::Runtime::InteropServices::DllImport("user32.dll")]<br />
extern bool SetForegroundWindow(IntPtr ^hWnd);
I call the code in Click event of the System::Windows::Forms::NotifyIcon component, and it gets called, but it has no effect.
|
|
|
|