Showing results 1 to 40 of 55
Search took 0.01 seconds; generated 1 minute(s) ago.
Posts Made By: ninjaneer
Forum: C++ Aug 6th, 2008
Replies: 0
Views: 647
Posted By ninjaneer
calling unmanaged function from managed C++

Hello again, daniweb.

I have created a managed C++ GUI using windows forms that needs to call some functions in an unmanaged C++ DLL that was created by the MATLAB compiler.

The functions from the...
Forum: C++ Jul 30th, 2008
Replies: 1
Views: 334
Posted By ninjaneer
Re: calling multiple DLLs in CLR

guess I should add that

MATLABNamespace::MATLABFunctionThreader is a class that provides methods for my C# GUI to call... so the one that says

startProcessingThread(...) is the one that uses...
Forum: C++ Jul 30th, 2008
Replies: 1
Views: 334
Posted By ninjaneer
calling multiple DLLs in CLR

Hello, I have a C# GUI that is supposed to call a backend I have in a C++ CLI/CLR shared library. That library calls another DLL that was created by MATLAB, but I can't get the second DLL...
Forum: C# Jul 30th, 2008
Replies: 12
Views: 2,621
Posted By ninjaneer
Re: C++ to C# interop -- wrapper class?

And to access a regular ol' unmanaged DLL with unmanaged code? Any special tricks like P/Invoke? Or can I just call it like normal?
Forum: C# Jul 29th, 2008
Replies: 12
Views: 2,621
Posted By ninjaneer
Re: C++ to C# interop -- wrapper class?

I am not casting System::String as (const char*) that is a special proprietary class called mwString being cast into a char array via the sprintf_s function.

I moved UINT createMATLABThread(LPVOID...
Forum: C# Jul 29th, 2008
Replies: 12
Views: 2,621
Posted By ninjaneer
Re: C++ to C# interop -- wrapper class?

Okay... I think I've almost got it... I just need to figure out what delegates are...

Here's what I've done so far:

MATLABDataWrapper is an unmanaged class who holds information I get from...
Forum: C# Jul 29th, 2008
Replies: 12
Views: 2,621
Posted By ninjaneer
Re: C++ to C# interop -- wrapper class?

woah hey! That makes sense... I'll try it and close the thread if it works. :)
Forum: C# Jul 29th, 2008
Replies: 12
Views: 2,621
Posted By ninjaneer
Re: C++ to C# interop -- wrapper class?

I didn't have my MATLABlib.lib included... I can use the managed code now.


Do you have a reference to any tutorials on these weirdo managed pointer things?

What I'm really trying to do is use...
Forum: C# Jul 29th, 2008
Replies: 12
Views: 2,621
Posted By ninjaneer
Re: C++ to C# interop -- wrapper class?

okay. Now I've created a CLI/CLR class library... most of my issues before were due to not properly updating my DLL reference in C# *D'OH!*

Now I've just got one little problem, the following is an...
Forum: C# Jul 24th, 2008
Replies: 2
Views: 284
Posted By ninjaneer
Re: A simple exception question:

... yeah... but isn't Forms.dll my GUI stuff? All the other buttons work... it's just the one that is calling the external DLL that is crashing out.

I feel like it must be deeper than a simple...
Forum: C# Jul 23rd, 2008
Replies: 2
Views: 284
Posted By ninjaneer
A simple exception question:

I am getting the following unhanded exception:

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in System.Windows.Forms.dll

Additional information: The specified module...
Forum: C++ Jul 22nd, 2008
Replies: 7
Views: 385
Posted By ninjaneer
Re: C++ DLL not found, help wrapping C++

C:\WINDOWS is there

In the meantime I've been poking around trying to figure out how to wrap my original C++ DLL with a managed C++ class... I think that if the code is managed I'll have an easier...
Forum: C++ Jul 22nd, 2008
Replies: 7
Views: 385
Posted By ninjaneer
Re: C++ DLL not found, help wrapping C++

I hesitated to do this because I can't install the DLL on all of the machines that will need to run this code. I understand that what I did is useless, but I'm not convinced it'll be useful to go...
Forum: C++ Jul 22nd, 2008
Replies: 7
Views: 385
Posted By ninjaneer
Re: C++ DLL not found, help wrapping C++

my PATH environment contains the folder that the DLL is being placed into... er... by that I mean I added the DLL's path to the additional dependencies directory...?
Forum: C# Jul 22nd, 2008
Replies: 12
Views: 2,621
Posted By ninjaneer
C++ to C# interop -- wrapper class?

hi! I'm trying to get the following C++ class (contained in a DLL):


__declspec(dllexport) class ThreadManager {
public:
__declspec(dllexport) static UINT32 setThreadPriority(UINT32...
Forum: C++ Jul 22nd, 2008
Replies: 17
Views: 682
Posted By ninjaneer
Re: Help, project due the 31st.

I'd write a lil' function for each 'weapon type' as you've currently got it sectioned...

then in main you'd have only function calls like:


int main( ){
String character = getCharacterSelection(...
Forum: C++ Jul 21st, 2008
Replies: 7
Views: 385
Posted By ninjaneer
C++ DLL not found, help wrapping C++

I have a C++ dll that I am trying to call in another section of code (happens to be C#)

currently I am getting the following error:

Additional information: Unable to load DLL...
Forum: C# Jul 17th, 2008
Replies: 0
Views: 289
Posted By ninjaneer
importing C++ code into C# via wrapper?

I've been googling this topic for a while, but I haven't found a very clear tutorial.

I have created a GUI in C# (it's so easy!) and now I want to implement a C++ backend that I've got that is...
Forum: C# Jul 17th, 2008
Replies: 2
Views: 221
Posted By ninjaneer
Re: C# cWinThreads? and MFCs

yeah... I'd gotten that far. The search continues. :)
Forum: C# Jul 16th, 2008
Replies: 2
Views: 221
Posted By ninjaneer
C# cWinThreads? and MFCs

I'm writing a GUI for a C++ program I have already written. Currently I need to either port a section of C++ code using MFC to the C# program, or use a wrapper and call the functions from C#. I'd...
Forum: C++ Jul 8th, 2008
Replies: 16
Views: 669
Posted By ninjaneer
Re: String/Class problem(s)!!

sure.

what's the error?
Forum: Geeks' Lounge Jul 8th, 2008
Replies: 26
Views: 3,124
Posted By ninjaneer
Re: Tech Poetry

or this one: poem();



string poem( )
{ static int c = 0, a;

if(c<3)
{c++;
std::cout << "roses are red\n";
Forum: Geeks' Lounge Jul 8th, 2008
Replies: 26
Views: 3,124
Posted By ninjaneer
Re: Tech Poetry

this one ain't mine, it's Monzy's and it's great:

Your mom circulates like a public key,
Servicing more requests than HTTP.
She keeps all her ports open like Windows ME,
Oh, there's so much drama in...
Forum: C++ Jul 8th, 2008
Replies: 16
Views: 669
Posted By ninjaneer
Re: String/Class problem(s)!!

yes, but perhaps you want to type

using namespace std;

in your files

either that or type std::string blah = "foo";

without knowing what problem you're having, I'm not certain what the solution...
Forum: C++ Jul 3rd, 2008
Replies: 7
Views: 680
Posted By ninjaneer
Re: C++ Cash register

sorta like this...


int x = 1234.56, thousands = 0;
double remainder;

remainder = x % 1000; // remainder is 234.56
thousands = x / 1000; // store how many thousands you have

//... you get the...
Forum: C++ Jul 3rd, 2008
Replies: 10
Views: 579
Posted By ninjaneer
Re: can 2 programs access the same file?

the second program cannot delete the file because the file is still open in the first program.

you need to stop the first program from 'constantly writing' and close the file before deleting.

this...
Forum: C++ Jul 3rd, 2008
Replies: 4
Views: 689
Posted By ninjaneer
Re: Phone book using C++

once you get started with your phone book, I'd suggest these two classes


class personalNumber{
public:
personalNumber(string, number);
string getName(void);
int getPhoneNumber(void);

//...
Forum: C++ Jul 3rd, 2008
Replies: 4
Views: 312
Posted By ninjaneer
Re: What's Wrong Here?

I found one 'wrong' thing in the title of the post:

you meant to write "help with MENUITEM"

and another thing that's 'wrong' exists in the body of your post itself:

you forgot to write what the...
Forum: C++ Jul 3rd, 2008
Replies: 3
Views: 261
Posted By ninjaneer
Re: New in c++

google "C++ integral class"... it might be in the standard math library (I doubt it) ... but there's a good chance it's been done before. No sense re-inventing the wheel.
Forum: C++ Jul 3rd, 2008
Replies: 9
Views: 759
Posted By ninjaneer
Re: Inheritance and friends

narue's solution was much more elegant... easier to understand... great analogy!
Forum: C++ Jul 3rd, 2008
Replies: 9
Views: 759
Posted By ninjaneer
Re: Inheritance and friends

basically a friend class would be a class that is allowed to access private variables of the class it is friends with

as in dog can access cat's age by calling getAge(); from within the dog...
Forum: C++ Jul 3rd, 2008
Replies: 18
Views: 1,325
Posted By ninjaneer
Re: Shortest path kind of problem...

assuming your map isn't too huge, couldn't this be solved by:

1) find a path to the cheese, set to 'shortest'
2) find another (unique) path to cheese, test for 'shorter than current shortest'
3)...
Forum: C++ Jul 3rd, 2008
Replies: 3
Views: 855
Posted By ninjaneer
Re: Find character in string

this is because:
Return Value for string.find(...) is:
1) The position of the first occurrence in the string of the searched content.
or
2) If the content is not found, the member value npos is...
Forum: C++ Jul 1st, 2008
Replies: 2
Views: 516
Posted By ninjaneer
Re: Thread Priority, Priority Classes, and OS Priority

ah! I didn't even notice that! That certainly would make a difference I imagine...
Forum: C++ Jun 30th, 2008
Replies: 2
Views: 516
Posted By ninjaneer
Thread Priority, Priority Classes, and OS Priority

Calling any multi-thread wizards. Here is a copy of the relevant parts of my main function...



CWinApp theApp; //the application's handle? not sure...

using namespace std;

UINT...
Forum: C++ Jun 30th, 2008
Replies: 16
Views: 670
Posted By ninjaneer
Re: small problem

click solved! click solved! :)
Forum: IT Professionals' Lounge Jun 27th, 2008
Replies: 3
Views: 427
Posted By ninjaneer
Re: Interesting Software Development

I love my job too... my job will someday be replacing the guys who replace the guys who replaced the people who used to do all the work... eventually people will have nothing to do for a living...
Forum: C++ Jun 27th, 2008
Replies: 16
Views: 670
Posted By ninjaneer
Re: small problem

also after you ignore, remember to cin.clear(); to reset the flags on your instream!
Forum: C++ Jun 27th, 2008
Replies: 16
Views: 670
Posted By ninjaneer
Re: small problem

Ah! it is obvious then that you need to clear your input stream after an invalid choice is made so that the same 'invalid' selection doesn't remain stuck in the stream!



for example, in the above...
Forum: Java Jun 27th, 2008
Replies: 6
Views: 313
Posted By ninjaneer
Re: *** help me urgent ***

build the robots.
Showing results 1 to 40 of 55

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:00 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC