|
Dear all,
I was told by my professor to make a program in Perl and that is done. I now would like to intergrate it into a GUI program that will execute the Perl program. If this is possible, how do I do so? Does the user have to have a copy of Perl on his/her computer?
Many thanks.
Chun Te
|
|
|
|
|
Yes, they'll need to have perl installed, unless you package the perl program up into an exe using perlapp from activestate or perl2exe from I forgot who. Neither are free, but you can get a 7 day trial license of perlapp, that may do the trick.
-Lunchy
|
|
|
|
|
I love Perl. It's so great that I like with
my C++ too. Here's info on embedding a Perl
interpreter into your C/C++ projects.
No need for the user to install Perl, just
build in your own interpreter into your projects.
|
|
|
|
|
COOL! It's funny, TMTOWTDI is almost getting cliche.
-Lunchy
|
|
|
|
|
At the moment i am having trouble adding tree items using separate functions in Visual C++.
Basically I need a series of buttons to add tree items in the order they are pressed. However at the moment I am finding that all items have to be added in the same function (ie. the same button) since I do not know how to set up the code so that variables created in one function can be referenced by calls in another function. For example when one item is created by a function, the other function is not aware of it's existance and hence any instructions to place a new item after it cannot be understood.
Can anyone help? I apologise for my poor command of the technical terminology - I am very new to programming.
|
|
|
|
|
Hello, from time to time i play a game, and sometimes when the game is too hard i download one of those trainer programs that alter certain memory locations so that you may have more health or experience or whatever. Now my question is how do they determine where the values are in memory and how are they changed?? i mean, dont the memory addresses change when the game is written in C or any higher level language when a variable is declared? How does a trainer spot the locations and alter them??
Thanks for any help
Kuniva
--------------------------------------------
|
|
|
|
|
This could be done many ways, depending on how the game/program was designed. They could be storing information in the registry, an XML file, their own file type....etc, I think you get the point.
If you have a *trainer* program, typically I would assume that the program knows where the *user data* is stored and then simply modifies it for you, that's all.
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|
|
Ok, I finnaly worked out what I want to manipulate from a dll plugin. Now I want a quick rundown of how to use LoadLibrary and GetProcAddres. If you could help me by using the function names I have so I know where to put them I would apreciate that. They are CString getDLLInfo(), and void ALSTGPlug(). Thanks in advance.
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
|
Sorry it didn't come up. Could you send me the title of the discussion so that I can take a look at it? Thank you.
Darroll
|
|
|
|
|
"Calling convention in a DLL"
original post by Paul Riley
Just trying to keep the forces of entropy at bay
|
|
|
|
|
Hey guyz, I'm new here. I'm working on rewriting our company's password procedures. Dictionary base and such. All of the actual code for word lookup and such is done. It's now time for me to figure out a way to implement it in a DLL.
I've decide to go the way of this example[^]. I've created the dll in VC but I get a massive list of errors which are the following:
Compiling...
StdAfx.cpp
Compiling...
beta.cpp
H:\code_project\beta\beta.cpp(39) : error C2143: syntax error : missing ';' before '__stdcall'
H:\code_project\beta\beta.cpp(39) : error C2501: 'NTSTATUS' : missing storage-class or type specifiers
H:\code_project\beta\beta.cpp(41) : error C2065: 'PUNICODE_STRING' : undeclared identifier
H:\code_project\beta\beta.cpp(41) : error C2146: syntax error : missing ')' before identifier 'UserName'
H:\code_project\beta\beta.cpp(41) : warning C4229: anachronism used : modifiers on data are ignored
H:\code_project\beta\beta.cpp(41) : error C2501: 'PasswordChangeNotify' : missing storage-class or type specifiers
H:\code_project\beta\beta.cpp(44) : error C2059: syntax error : ')'
H:\code_project\beta\beta.cpp(64) : error C2143: syntax error : missing ';' before '{'
H:\code_project\beta\beta.cpp(64) : error C2447: missing function header (old-style formal list?)
H:\code_project\beta\beta.cpp(96) : error C2146: syntax error : missing ')' before identifier 'UserName'
H:\code_project\beta\beta.cpp(96) : warning C4229: anachronism used : modifiers on data are ignored
H:\code_project\beta\beta.cpp(100) : error C2059: syntax error : ')'
H:\code_project\beta\beta.cpp(127) : error C2143: syntax error : missing ';' before '{'
H:\code_project\beta\beta.cpp(127) : error C2447: missing function header (old-style formal list?)
Error executing cl.exe.
beta.dll - 12 error(s), 2 warning(s)
What's up with NTSTATUS giving me errors? Ne ideas?
---------------------------------
I'm new here, pardon the n00bing
---------------------------------
|
|
|
|
|
Just a wild guess, but it looks to me like a missing semicolon ( possibly in a header file ). Hard to tell for sure without seeing the code.
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
Sometimes the compiler issues C2143 (the 1st error in your output) in lieu of saying it couldn't recognize the preceding identifier. If that's the case, you're missing an #include file somewhere. "NTSTATUS " and "PUNICODE_STRING " look like items from windows.h , so I would check that you've included it, and properly defined things like WINVER to get the definitions you need.
Gary R. Wheeler
|
|
|
|
|
How can I convert CTime to DATE or COleDateTime?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
donno does this help??
COleDateTime::SetTime( int nHour, int nMin, int nSec );
CTime::GetYear
CTime::GetMonth
CTime::GetDay
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Be careful converting these two.
They are really apples and oranges.
CTime encapsulates an interval from
some known time (placement on a time
time line whose origin is attached to
a specific event) whereas COleDateTime
merely encapsulates a time representation
such as 5JUL1998 7:23AM. (placement on a
timeline whose origin is not attached to
any specific event)
So when converting, you need to provide
the origin value by which the COleDateTime
can be interpreted.
I prefer to convert as explicitly as possible
and not use methods which implicitly specify
the origin value for the COleDateTime conversion.
(that way lies madness.)
|
|
|
|
|
Oh yeah, code:
// ASSUMES COleDateTime represents UTC times
// COleDateTime --> CTime
COleDateTime Origin(1970,1,1,0,0,0); // corresponds to time_t(0) in UTC
CTime T(time_t((U-Origin).GetTotalSeconds()));
// CTime --> COleDateTime
double SecInDay=86400.0;
COleDateTime U=Origin+COleDateTimeSpan(T.GetTime()/SecInDay);
|
|
|
|
|
Hi,
I have an application that uses the list view to show some data. I want to be able to highlight some of the lines, let's say in red background. Is there a way to change the color of a specific line in the list view?
I tried to use the selection option but as soon as I click with the mouse on one of the items, all the selections are gone,
Any help is appreciated
Thank you
Shay Harel
|
|
|
|
|
|
Great, exactly what I needed
|
|
|
|
|
Hi
I don't know exactly how to explain my question...I'll try it that way:
Say I have created my own class CFoo , it has a function called void CallApplication(???) . I have seen classes where you could use parameters like
m_myClass.CallApplication(CFoo::Notepad);
How do I need to define my function/parameters in the class in order to let the user use parameters that way? E.g. you can use CFile like that CFile file("C:\foo.txt", CFile::typeBinary | CFile::modeRead); (I know that typeBinary is only for derived classes, I just wanted to show what my question is)
hope you understand my problem
regards
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Have a member in ur class:
static int Notepad;
or static enum { Notepad, WordPad };
and Somewhere
void CallApplication ( int openWhat )
{
switch ( openWhat )
{
case Notepad:
break;
}
}
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thank you very much! I didn't know I had to make those variables static
But why can I access the variables from outside the class now even if they are protected/private?
And one more question:
Actually if I type the second colon (e.g. CFoo:: ) VC usually shows me a list of all variables and functions available for this class, but my variables inside the enum do not appear in this list. Why?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Just the name of the enum appears!
Declaring a variable static makes this variable shared between all the instances of your class, and being "present" without needing an instance of your class either.
So u can see it as a plain static int i; C style, nothing more nothing less.
Anyway declaring a function static makes impossible to this function to access non static member variables.
But u need to declare a function static if its a worker thread and u wanna add it to ur class.
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|