Stefano Mtangoo 455 Senior Poster

Thanks for the Link.
I am interested only in freeware if is there!

Stefano Mtangoo 455 Senior Poster

if you change your mind and learn wxWidgets insteda there is free Ebook (pdf). Just search somewhere in the forum

Stefano Mtangoo 455 Senior Poster

Please help me as I'm just diving in DLL issues
Cheers :)

MosaicFuneral commented: Beg bumping. -1
Stefano Mtangoo 455 Senior Poster

I have this DLL code, but I cannot access function.
Where am I wrong?

main.h

#ifndef __MAIN_H__
#define __MAIN_H__

#include <windows.h>
/*  To use this exported function of dll, include this header
 *  in your project.
 */

#ifdef BUILD_DLL
    #define DLL_EXPORT __declspec(dllexport)
#else
    #define DLL_EXPORT __declspec(dllimport)
#endif


#ifdef __cplusplus
extern "C"
{
#endif

//simple functions are being exported
EXPORT_DLL double Addition(double a, double b);
EXPORT_DLL double Multiplication(double a, double b);
#ifdef __cplusplus
}
#endif

#endif // __MAIN_H__

main.cpp

#include "main.h"

//add them and return the answer
double DLL_EXPORT Addition(double a, double b)
{
	double c = a+b;
	return c;
}

//multiply them and return the answer
double DLL_EXPORT Multiplication(double a, double b)
{
	double c = a*b;
	return c;
}

And here is the console App that calls the DLL

#include <iostream>
#include <windows.h>
typedef double(*FuncPtr)(double a, double b);
//declare DLL handle
HINSTANCE hDLL;
//declare pointers to the functions
FuncPtr AddFunc, MultiFunc;

using namespace std;

int main()
{

    //create handle to our DLL
    hDLL = LoadLibrary("mathdll");
    //Get proc address if handle is valid
    if (hDLL!=NULL)
    {
        cout<<"Loaded DLL! \n"<<"Getting Proc Address"<<endl;
        AddFunc = (FuncPtr)GetProcAddress(hDLL, "Addition");
        if(AddFunc)
        {
            cout<<"Sum of 8 and 2 is: "<<AddFunc(8.0, 2.0);
            FreeLibrary(hDLL);
        }
        else
        {
            cout<<"Failed to get a function! Unloading the DLL"<<endl;
            FreeLibrary(hDLL);
        }
    }
        return 0;

}
Stefano Mtangoo 455 Senior Poster

Since there is no answer, I think I have to open separate thread for DLL Issues.
Thank All!

Stefano Mtangoo 455 Senior Poster

Don't mess with hidden folders/files unless you know what you are doing! I don't know what they are, but take that advice seriously. May be use google :)

Stefano Mtangoo 455 Senior Poster

I want to do different commandline task and don't want many windows! Just tabs :)

Stefano Mtangoo 455 Senior Poster

These are pretty good freeware:
Avira Antivir personal
Avast home
AVG free
Any of it, any! But I use avast as I said

Stefano Mtangoo 455 Senior Poster

I use Avast, and have not let me down

Stefano Mtangoo 455 Senior Poster

Check how django is run in servers. It is being used with python I don't know

Stefano Mtangoo 455 Senior Poster

Reset CMOS as advised . Also check for firmware software may be that one tried to install upgrade to CMOS and it failed. Try to to upgrade yourself your CMOS software from official manufacturer site of your motherboard.

CAUTION: Upgrading CMOS is very dangerous, make sure you follow carefully the instructions

Stefano Mtangoo 455 Senior Poster

Hi All,
Is there any Remote Desktop connection that is compatible with Microsoft's remote desktop? I won't Like VNC because it will force me to install in each PC I want to RLogin
There is this but I guess it have no port for Windows

http://sourceforge.net/projects/rdesktop/

Stefano Mtangoo 455 Senior Poster

Any multitabbed version of Windows CMD.exe?

Stefano Mtangoo 455 Senior Poster

In case you don't like to bother writing the codes for setup.py, use GUI for Py2exe which can export setup.py
www.code.google.com/p/gui2exe/

Stefano Mtangoo 455 Senior Poster

output
Poped: d
Poped: c
Poped: b
Poped: a

Stefano Mtangoo 455 Senior Poster

What do you want to accomplish?
Here is simple Looping. It prints what is poped

L1 = ["a", "b", "c", "d"]
for i in range(len(L1)):
    print "Poped: %s" %(L1.pop())
Stefano Mtangoo 455 Senior Poster

Not big, but why not Go for wxWidgets?
Free book, free IDEs(Recommending Code::Blocks) and free GUI builders (wxSmith and wxForm builder)

Stefano Mtangoo 455 Senior Poster

No errors to me too (Vega's version)
Check your python installation

Stefano Mtangoo 455 Senior Poster

How didi it get started?

Stefano Mtangoo 455 Senior Poster

Best Compiler? That's pretty subjective. Not good at compilers but MINGW and VC++ are really big. They work BIG and many apps are compiled by them. I recommend Code::Blocks as it allows you to use any compiler you wish!

Not for beginners MIGHT be an alias for Visual C++ Pro Edi$$ion :)
$o, go for it :)

Stefano Mtangoo 455 Senior Poster

I wonder how it runs on you!
What version of wxPython do you have?

Stefano Mtangoo 455 Senior Poster

Why not? It worked for me when I tested his code... and there's nothing wrong with his binding as I added another menu item with a separate function and ID and that still worked without conflict.

here is what I got:

File "c:\Users\Elijah Ministries\Desktop\daniweb.py", line 17, in <module>
  frame = MainFrame('Ya Mum')
File "c:\Users\Elijah Ministries\Desktop\daniweb.py", line 11, in __init__
  self.Bind(wx.EVT_MENU, self.Close(), id=ID_FILE_QUIT)
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 3911, in Bind
  event.Bind(self, id, id2, handler)
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 3985, in Bind
  target.Connect(id1, id2, et, function)
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 3868, in Connect
  return _core_.EvtHandler_Connect(*args, **kwargs)
Stefano Mtangoo 455 Senior Poster

Hi all,
I have seen MacBook from my friend and have loved nice bash command line interpreter. Is there similar one for Windows XP/VISTA???
Here are some nice feature lacking in windows:
1. Tabbing
2. Full screen on maximization of window
3. The use of sudo command (At least there something similar with Vista)
4. Of course nice colour
Thanks

Stefano Mtangoo 455 Senior Poster

Hi,
after some roaming around MSDN library, I got some light on DLLs issues. Then I tried to make DLL and call it in simple app. But the call produces weird strange results. What is wrong with the code?

Also when I make new DLL project in code::blocks, code::blocks gives a code by default. I don't understand most of IFDEFs it writes!

My DLL Code is:
main.h

#ifndef __MAIN_H__
#define __MAIN_H__

#include <windows.h>

/*  To use this exported function of dll, include this header
 *  in your project.
 */

#ifdef BUILD_DLL
    #define DLL_EXPORT __declspec(dllexport)
#else
    #define DLL_EXPORT __declspec(dllimport)
#endif


#ifdef __cplusplus
extern "C"
{
#endif

DLL_EXPORT double Add(double a, double b);

#ifdef __cplusplus
}
#endif

#endif // __MAIN_H__
#include "main.h"
# include<iostream>
using namespace std;

// a sample exported function
DLL_EXPORT double Add(double a, double b)
{
    cout<<"DLL got called!"<<endl;
   return(a+b);
}

Application that call the DLL

// MyExecRefsDll.cpp
// compile with: /EHsc /link MathFuncsDll.lib

#include <iostream>

#include "windows.h"

using namespace std;
//dll stuffs
typedef double (*AddFunc)(int a, int b);

int main()
{
    //declare the pointers to DLL functions
    AddFunc Add;
    HINSTANCE ourlib = LoadLibrary("math.dll");
    if (ourlib==NULL)
    {
        FreeLibrary(ourlib);
    }

    else
    {
        Add = (AddFunc)GetProcAddress(ourlib, "Add");
        double a = 7.4;
        double b = 99.6;

        cout << "a + b = " <<
            Add(a, b) << endl;
        /*cout << "a - b = " <<
            MathFuncs::MyMathFuncs::Subtract(a, b) << endl;
        cout << "a * b = " <<
            MathFuncs::MyMathFuncs::Multiply(a, b) << endl;
        cout << "a …
Stefano Mtangoo 455 Senior Poster

Setting up py2exe can be tedious Job, but Andrea Gavana have done such plausible work to make a GUI.
http://code.google.com/p/gui2exe/

I have made DrPython to exe and packed it with Inno setup compiler and It works wonderfully! So If you think of making exe, then I think it is a way to go!

Stefano Mtangoo 455 Senior Poster

Is sending a file Illegal?
If not, then I can send It to you
I have downloaded full via a link I provided above.
I cannot test whether installation works or not as I use USB stick version and don't have Python (at work now). So If it is legal send me Email and I will send it to you :)

Stefano Mtangoo 455 Senior Poster

Does it take UML knowledge to be good at designing BIG project?
If yes is there free UML modeling software?
Thanks

Stefano Mtangoo 455 Senior Poster

Nope, sorry same thing. You're saying that link allows you to download 2.8 and it works?

I have not tested whether Installation works or not. But this is a link I retrieved in my FreeDownload manager, I downloaded long ago. I tested it in FDM and it started downloading. I expected it to work since it is direct Link to download a file
Sorry :(

Stefano Mtangoo 455 Senior Poster

That's funny Bob :)

Stefano Mtangoo 455 Senior Poster

I'm sorry for that!
Here is a mirror I have tested and it works. Hope you will try it soon before all goes wrong

http://garr.dl.sourceforge.net/sourceforge/wxpython/wxPython2.8-win32-unicode-2.8.10.1-py25.exe

Stefano Mtangoo 455 Senior Poster

Any Idea IS APPRECIATED

Stefano Mtangoo 455 Senior Poster

I want to make simple Bible web that will be querying from database. It is boggling my Mind how to populate the database.
The Bible have the following division
Bible have 66 books
Each book have chapters
and Each chapter have verses

Please help me, I have stucked

Stefano Mtangoo 455 Senior Poster

Haven't read it yet,
but free book by Bruce Eckel.
Just google out "Thinking in C++"
BTW I have enjoyed Deitel's C++ book

Stefano Mtangoo 455 Senior Poster

I hear alot from my fellow developer about these schema stuffs.
Im new to database and I wonder what Schema is. I can play with tables and databases,

Stefano Mtangoo 455 Senior Poster

Ok,
I think I need someone to help me to get up and running with DLLs.
I have googled for Tutorial, but I find difficult to follow much of tutorials. They just do a lot in advanced way and I'm just a new bee :)

Stefano Mtangoo 455 Senior Poster
Stefano Mtangoo 455 Senior Poster

Hehehe, I meant that others have done this too ;)
Anyway ho do I go about it?

Stefano Mtangoo 455 Senior Poster

what editor do you use?
Get ulipad
http://code.google.com/p/ulipad/

shadwickman commented: ulipad is amazing, thanks for mentioning it! +3
Stefano Mtangoo 455 Senior Poster

Hello developers,
I have been playing around with C++ and wxWidgets for a little time now and I think it is time to make a little useful program I am planning to make a CD ripper and Encoder (re-inverting the wheel purposely for learning) and I plan to use CDRip.dll or Akrip32.dll as rippers and Lame as Encoder. Alot of words anyway here comes a question:

1. How do I load dll functions in My C++ program and use their function

2. Any good example on CD ripping or Encoding?

I'm trying to follow the tutorial here but it is for VB
http://www.vbaccelerator.com/home/VB/code/vbMedia/Audio/CD_Ripping_1/article.asp

Hope to benefit from your experiences guys :)
Cheers

Stefano Mtangoo 455 Senior Poster

How far have you tried/brainstormed?
Hint: Check os.path.join() and lower() function

Stefano Mtangoo 455 Senior Poster

http://alleg.sourceforge.net/readme.html
it says alleg is for multimedia and games.
So to my understanding, it is simply aimed not at General GUI but geared to multimedia/games

Stefano Mtangoo 455 Senior Poster

Oh! Learning wxwidgets and C++ are easier, at least for me it have been. You use C++ codes. Only there are ready classes that you inherit to make your GUI and all the widgets. So with GUI, you must be immersed in C++ OOP concepts especially Inheritance.

That Book plus tutorials like one in www.zetcode.com should boost you up. But In case you choose wxWidgets as your GUI toolkit.
Here are GUI toolkit (Heavy weight ones) that closely compete:
1. wxWidgets
2. QT
3. GTKmm

So once you choose one, you have a go! :)

Stefano Mtangoo 455 Senior Poster

You are welcome! :)

Stefano Mtangoo 455 Senior Poster

Delete that file and re-copy and paste.
That is VeRy StRaNgE huh! :)
May be taking it to "computer mental hospital" can help recognize what is wrong ...........hehehe :)

kvprajapati commented: Don't offend. +0
Stefano Mtangoo 455 Senior Poster

html is easy, so you don't need to stop it to learn wxpython. Just a word of encouragement, wxpython is easy and learning it is funny. I happily learned it and I'm learning its father, wxwidgets. To start, I will point to www.zetcode.com/wxpython and once you have any problem, consult wx's API and in case of gettig the taste while learning, make sure you download wxdemo and run it

If those all doesn't help, try Daniweb or any other Py related forum.
To be good at wxpython and general programming, need crash and brush.

So, start.......:)
www.wxpython.org

Stefano Mtangoo 455 Senior Poster

if possible, just include it in same folder as your script and do a simple import as you did to sys. Otherwise, if correctly installed, then it should respond to simple import. Did you write the module or installed it from someone/somewhere?

shadwickman commented: Good tip about importing +2
Stefano Mtangoo 455 Senior Poster
Stefano Mtangoo 455 Senior Poster

Just improvement,
In python there is lower() function that makes it easier to test. So in python, instead of

if ((izbor=='d')||(izbor=='D'))

You have

if izbor.lower()=="d"

I'll check for C++ equivalent. I do a lot in Py and few of C++ :)

Stefano Mtangoo 455 Senior Poster

Go for wxWidgets. It is simple and have heavy documentation.
Go to :
www.wxwidgets.org
and
www.zetcode.com
With a bonus of free official book in Bruce Perens open source series, It is really best stuffs
http://www.phptr.com/content/images/0131473816/downloads/0131473816_book.pdf

Stefano Mtangoo 455 Senior Poster