Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 08-20-2004, 01:22 AM   #1 (permalink)
nesvarbu
Registered User
 
Join Date: Aug 2004
Posts: 6
nesvarbu is on a distinguished road
whats the problem?

Here's the code:

Code:
typedef struct _PROCESS_INFORMATION {
                        HANDLE hProcess;
                        HANDLE hThread;
                        DWORD dwProcessId;
                        DWORD dwThreadId;
                        } PROCESS_INFORMATION;

        PROCESS_INFORMATION ProcessInformation;


        if(CreateProcess("cmdline.bat",NULL,NULL,NULL,true,NULL,NULL,NULL,NULL,&ProcessInformation)== 0)
        {
          
        }
And here's the error for If line:

Code:
 [C++ Error] Atnaujinimo_forma.cpp(218): E2034 Cannot convert '_PROCESS_INFORMATION *' to '_PROCESS_INFORMATION *'
[C++ Error] Atnaujinimo_forma.cpp(218): E2342 Type mismatch in parameter 'lpProcessInformation' (wanted '_PROCESS_INFORMATION *', got '_PROCESS_INFORMATION *')
What I'm doing wrong?
nesvarbu is offline   Reply With Quote
Old 09-14-2004, 12:57 PM   #2 (permalink)
bdiamond
Registered User
 
Join Date: Jul 2004
Posts: 5
bdiamond is on a distinguished road
I don't think you should be making your own PROCESS_INFORMATION struct. just define your variable of type PROCESS_INFORMATION and fill in the appropriate members. Reading the documentation on the PROCESS_INFORMATION structure shows that it is already declared in winbase.h and is a part of the windows.h header file. So if you have an app that is using windows, there's no need for you to typedef that struct
bdiamond is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
c simple question problem with switch case if13121 Standard C, C++ 1 10-24-2004 10:43 PM
problem with editing profile cheawick Feedback 0 04-28-2004 11:26 PM
Help debugging a power problem Belisarius Lounge 0 10-25-2003 05:44 PM
structure problem Goshi Standard C, C++ 5 04-21-2003 01:19 AM
This is a windows/C problem UnderWing Standard C, C++ 6 03-28-2003 07:17 AM


All times are GMT -8. The time now is 12:09 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting