Click here to Skip to main content
15,902,112 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionExecuting code remotely Pin
Imtiaz Murtaza18-Mar-06 6:51
Imtiaz Murtaza18-Mar-06 6:51 
QuestionTransaction state in 3-tier architecture Pin
Sheshadrinath17-Mar-06 23:05
Sheshadrinath17-Mar-06 23:05 
AnswerRe: Transaction state in 3-tier architecture Pin
Guffa18-Mar-06 2:27
Guffa18-Mar-06 2:27 
QuestionReplace system tray clock Pin
bowlermonk17-Mar-06 7:33
bowlermonk17-Mar-06 7:33 
AnswerRe: Replace system tray clock Pin
Dave Kreskowiak17-Mar-06 9:20
mveDave Kreskowiak17-Mar-06 9:20 
GeneralRe: Replace system tray clock Pin
bowlermonk17-Mar-06 10:43
bowlermonk17-Mar-06 10:43 
GeneralRe: Replace system tray clock Pin
Dave Kreskowiak17-Mar-06 16:25
mveDave Kreskowiak17-Mar-06 16:25 
QuestionProblem getting thread to work Pin
rsw117-Mar-06 6:57
rsw117-Mar-06 6:57 
Hello all,
I am trying to create a video capture app using the windows media encoder9 sdk in visual studio 2003 .net a windows form project. using c++
and don't understand why this function call
CoCreateInstance(CLSID_WMEncoder,NULL,CLSCTX_INPROC_SERVER,IID_IWMEncoder2,(void**)&g_pEncoder);
will work perfectly fine in button1_click function (ie the g_pEncoder gets a value) but if I call the same function in the thread "mainloop" g_pEncoder comes back as not defined.Sigh | :sigh:
I have illiminated a lot of code ie: defines, includes etc. to save space.
Thanks for your time.

IWMEncoder2* g_pEncoder; //Global Variable
namespace TestingMyService
{
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;

public __gc class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)

{
InitializeComponent();
}

protected:
void Dispose(Boolean disposing)
{
if (disposing && components)
{
components->Dispose();
}
__super::Dispose(disposing);
}

private:
System::ComponentModel::Container * components;

void InitializeComponent(void)
{
}

private: System::Void button1_Click(System::Object * sender, System::EventArgs * e)
{

CoCreateInstance(CLSID_WMEncoder,NULL,CLSCTX_INPROC_SERVER,IID_IWMEncoder2,(void**)&g_pEncoder);
Threading::ThreadStart* threadstart = new Threading::ThreadStart(this,mainloop);
servicethread = new Threading::Thread(threadstart);
servicethread->Start();
}

public: static void mainloop(void)
{
CoCreateInstance(CLSID_WMEncoder,NULL,CLSCTX_INPROC_SERVER,IID_IWMEncoder2,(void**)&g_pEncoder);
}
QuestionTextBox Control Pin
John L. DeVito17-Mar-06 6:17
professionalJohn L. DeVito17-Mar-06 6:17 
AnswerRe: TextBox Control Pin
Guffa17-Mar-06 6:37
Guffa17-Mar-06 6:37 
GeneralRe: TextBox Control Pin
John L. DeVito17-Mar-06 7:18
professionalJohn L. DeVito17-Mar-06 7:18 
AnswerRe: TextBox Control Pin
Office Lineman17-Mar-06 7:19
Office Lineman17-Mar-06 7:19 
AnswerRe: TextBox Control Pin
HimaBindu Vejella19-Mar-06 23:47
HimaBindu Vejella19-Mar-06 23:47 
QuestionDetect and ignore missing COM, dll, library Pin
sgub16-Mar-06 15:22
sgub16-Mar-06 15:22 
Questionsql ce Pin
sunny74716-Mar-06 9:35
sunny74716-Mar-06 9:35 
AnswerRe: sql ce Pin
Mike Dimmick18-Mar-06 11:01
Mike Dimmick18-Mar-06 11:01 
QuestionReading in data from GPS(serial Port) Pin
prashantkgupta16-Mar-06 8:59
prashantkgupta16-Mar-06 8:59 
QuestionProblem Publishing with Visual Studio 2005 Pin
kayhustle16-Mar-06 8:56
kayhustle16-Mar-06 8:56 
QuestionIP Cameras Pin
programmingfish15-Mar-06 20:54
programmingfish15-Mar-06 20:54 
AnswerRe: IP Cameras Pin
xlthim15-May-07 9:52
xlthim15-May-07 9:52 
QuestionClicking *Through* a Form? Pin
TheZeusJuice15-Mar-06 16:38
TheZeusJuice15-Mar-06 16:38 
AnswerRe: Clicking *Through* a Form? Pin
Dave Kreskowiak15-Mar-06 17:35
mveDave Kreskowiak15-Mar-06 17:35 
GeneralRe: Clicking *Through* a Form? Pin
TheZeusJuice15-Mar-06 17:48
TheZeusJuice15-Mar-06 17:48 
GeneralRe: Clicking *Through* a Form? Pin
Dave Kreskowiak16-Mar-06 2:35
mveDave Kreskowiak16-Mar-06 2:35 
QuestionFree RAM as by minimize without displaying window Pin
mewashere15-Mar-06 11:57
mewashere15-Mar-06 11:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.