Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~8K People Reached
Favorite Tags

63 Posted Topics

Member Avatar for Nemoticchigga

Has anyone ever gotten an error saying "the specified file is an unrecognized or unsupported binary format" in regards to starting a library?

Member Avatar for thready
0
67
Member Avatar for Nemoticchigga

This is a general question. I am familiar with accessors and mutators (getters and setters). I have now been reading up on semaphores. I am having trouble finding out differences between them/how they are related. Can anyone help me out with an explaination or a link? Thanks. P.S. - sorry …

Member Avatar for ArkM
0
135
Member Avatar for Nemoticchigga

Does anyone know how to delare a managed class in unmanaged code? This is driving me nuts, because I can call unmanaged from managed, but not the other way. Is there a way to do this? Thanks in advance. I want this for example: class foo { public: //other code …

Member Avatar for Ancient Dragon
0
92
Member Avatar for Nemoticchigga

I have a struct. I want to declare a pointer to that struct. Now I want 10 of those structs. How is this declared? I have tried (call the struct foo for example): foo* test[10]; when I make a call to test[0]->whatever or test[5]->whatever it seems to always write to …

Member Avatar for MrSpigot
0
116
Member Avatar for Nemoticchigga

I have an vs2005 forms application running a thread to constantly try and receive data via ethernet. My problem is once I get the data I want to pass it up through some object oriented layers. When I try to make a call to one of the layers sampleLayer->blah(); I …

0
90
Member Avatar for Nemoticchigga
Member Avatar for mechbas
0
72
Member Avatar for Nemoticchigga

Is keil software for programming microcontrollers a free tool, or does it need to be purchased with a license? Thanks.

Member Avatar for Colin Mac
0
103
Member Avatar for Nemoticchigga

I am writing to a text file. Everything is working fine, except I can not figure out how to start a newline. I have tried fprintf(txtFile, "%s", "\n"); fprintf(txtFile, "%s", '\n'); fprintf(txtFile, "%s\n", " "); where txtFile is my FILE handle. How do I create a newline? Thanks.

Member Avatar for Freaky_Chris
0
203
Member Avatar for Nemoticchigga

I have a buffer of chars. I want to display them in a text box as hex. is there a simple way to do this? Thanks.

Member Avatar for Freaky_Chris
0
153
Member Avatar for Nemoticchigga

I want to delete a bitmap. How do I do this in c++. DestBitmap->Save("TempImage2.bmp"); . . . . . //later something like Delete("TempImage2.bmp"); is there a way to do this. thanks, nemo

Member Avatar for Liszt
0
128
Member Avatar for Nemoticchigga

I am drawing on a bit my, then re-loading the bitmap(to erase it) then drawing on it again at 100Hz. I am getting flicker. Is there a way to reduce this flicker? Or a better way to do this than to reload the bitmap everytime? Thanks.

Member Avatar for TheBeast32
0
96
Member Avatar for Nemoticchigga

How do you draw on an image in visual studio 2005 and get it to stay? Ive can get it to draw, but it flickers on resize and disappears when the resize is done. Any ideas?

Member Avatar for Nemoticchigga
0
145
Member Avatar for Nemoticchigga

How would one seperate a decimal into 2 numbers, the left and right sides of the decimal? float example = 131.14567 into... int left = 131 float right = .14567 thanks.

Member Avatar for ArkM
0
118
Member Avatar for Nemoticchigga

I am attempting to read a text file. [CODE] ifstream indata; indata.open(filename); if(!indata) { // file couldn't be opened } else { // file opened } // keep reading until end-of-file string data; while (getline(indata, data)) { //this is where i want to store values } indata.close();[/CODE] I want to …

Member Avatar for VernonDozier
0
86
Member Avatar for Nemoticchigga

I am current working on developing software in SUSE 10.2. The program works correctly, and then i statically compile it and run in DamnSmallLinux, and as soon as the program runs i get the 'set_thread_are failed when setting up thread-local storage area' error. I also tried to put the files …

Member Avatar for sparty
0
48
Member Avatar for Nemoticchigga

Does anyone know if vs2005 has the borland equivilent of a "scrollbox"? Thanks.

Member Avatar for Nemoticchigga
0
169
Member Avatar for Nemoticchigga

I am trying to run a simple program to read ethernet using UDP. Here is the code, but it always receives -1 for 'error', but I did it by the book. Do you guys see the problem? Thanks. [CODE]//enum specifying the current status of the comm port. enum e_PortStatus { …

Member Avatar for Salem
0
119
Member Avatar for Nemoticchigga

When can you determine if you are using too many threads? Assuming I have complete control and mutex locks and what not, when does it slow my program down, rather than speed it up by splitting up processing into sectons and passing between FIFO queues. Thanks.

Member Avatar for Salem
0
82
Member Avatar for Nemoticchigga

I am running a thread that does something, then sleeps for a while. If the program closes it continues to sleep to completion. How do I get it to abort immediatly, even if in the middle of sleeping? [CODE]void commThread::ThreadEntryPoint1() { while(1) { //do work Sleep(15000); //15 second sleep } …

Member Avatar for Tilir
0
108
Member Avatar for Nemoticchigga

I am attempting to use a queue. I am doing it just like an example i read. I am doing a vs2005 form applicaiton. [CODE]#pragma once #include <queue> public ref class DataSource { public: DataSource(void); void DSInitilize(void); char* getNextElement(void); System::Void setNextElement(char* value); private: queue<char> MessageQueue; };[/CODE] It is not finding …

Member Avatar for ArkM
0
135
Member Avatar for Nemoticchigga

I am trying to put the contents of a char buffer[512] into a word* (type def as data type short). How do I do this? I have tried memcpy but am either getting an exception or it will run but the word* is undefined value after the copy. Any advice …

Member Avatar for Ancient Dragon
0
101
Member Avatar for Nemoticchigga

Has anyone ever seen a function call just get skipped? I am running in debug mode and it wont let me set a break point on the call and when i step to it it goes right over to the next line, no exceptions, no errors. Has anyone EVER seen …

Member Avatar for Nemoticchigga
0
287
Member Avatar for Nemoticchigga

I have a vs2005 forms app, I have added a header file with a bunch of functions, but now i get a bunch of LNK2005 errors, one for every function. How do I resolve this? Do I need to put them in a class? Thanks.

Member Avatar for Salem
0
83
Member Avatar for Nemoticchigga

I am using the winsock component in vs2005. I have tried sending and recieving strings. The event of data arriving triggers and runs the following code... [CODE]private: System::Void WinSockControl_DataArrival(System::Object^ sender, AxMSWinsockLib::DMSWinsockControlEvents_DataArrivalEvent^ e) { System::String^ messageBuf = ""; this->WinSockControl->GetData(messageBuf); int i = this->WinSockControl->BytesReceived; }[/CODE] This gets run so the data is …

0
70
Member Avatar for Nemoticchigga

In vs2005 there is a winsock component, how do you receive data using the component? I found a ->SendData(blah), but cant find a receive. Does anyone know how to receive with this component? Thanks.

0
55
Member Avatar for Nemoticchigga

I am trying to open 2 forms when I start my vs2005 project. The main form, and a second form whose class is created, and then ->show. It shows both forms, but you can control either one. What I want is the main form to be "locked" until the "OK" …

Member Avatar for Nemoticchigga
0
305
Member Avatar for Nemoticchigga

I have a program with a bunch of threads running. I kill them all at the end of the program. I have stepped through and seen them all abort. Is there a way to see (since I cant when stepping through) which thread it is? I can see the process …

Member Avatar for Alex Edwards
0
84
Member Avatar for Nemoticchigga

I want to read each line of text file and store each line into a giant buffer so I can look at all the contents. How would I do this? [CODE]int _tmain(int argc, _TCHAR* argv[]) { ifstream indata; // indata is like cin indata.open("example.txt"); // opens the file if(!indata) { …

Member Avatar for Lerner
0
114
Member Avatar for Nemoticchigga

I have a server running using winsock2.h TCP/IP. I open two ports on my pc, and then in a different application connect and send and receive to and from the server respectivly. In my client application receiving port, everything is working perfectly. In my server that is receiving though, it …

0
58
Member Avatar for Nemoticchigga

[CODE] private: delegate System::Void delegate_function(void); if(this->InvokeRequired) { AsyncCallback ^ac = gcnew AsyncCallback(&WCS::MainForm::delegate_function_callback); delegate_function ^df = gcnew delegate_function(this, &WCS::MainForm::function_to_invoke); System::IAsyncResult ^asyncresult; //Begin invoke command here. try { asyncresult = df->BeginInvoke(ac, df); //asyncresult = this->statusLight->BeginInvoke(ac, df); //this->commsStatusLight->EndInvoke(asyncresult); //df->Invoke(); df->EndInvoke(asyncresult); //df->DynamicInvoke(ac, df); } catch (...) { std::cerr << "caught"; } } public: System::Void …

Member Avatar for Nick Evan
0
87
Member Avatar for Nemoticchigga

I am using the begininvoke and endinvoke methods in visual studio 2005. [CODE] private: System::Void button_run_Click(System::Object^ sender, System::EventArgs^ e) { AsyncCallback ^ac = gcnew AsyncCallback(&InvokeTest::Form1::delegate_function_callback); delegate_function ^df = gcnew delegate_function(this, &InvokeTest::Form1::function_to_invoke); df->BeginInvoke(ac, df); } private: delegate int delegate_function(void); public: int function_to_invoke(void) { label_status->Text = "Running"; //label_status->Text = "Stopped"; } private: …

Member Avatar for Ancient Dragon
0
110
Member Avatar for Nemoticchigga

[CODE]String^ comPort = "COM" + this->RS232CommPortNum->Value; int baudRate = Convert::ToInt32(this->cbBaudRate->Value); com = gcnew SerialPort(comPort, baudRate); try { com->Open(); } catch (...) { ::MessageBox::Show("Invalid Port"); }[/CODE] How do I handle this excepion thrown when the com number is not valid? When I run the release version it has an error when …

0
62
Member Avatar for Nemoticchigga

All my communication using this delegate and function are great between forms, but this thread for receiving compiles and all, but then throws this error. I have posted the important sections of my code. If you think I need more, let me know. Thanks. I am getting a Cross thread …

Member Avatar for Ancient Dragon
0
90
Member Avatar for Nemoticchigga

Is there a way to make a visual studio 2005 form repaint itself every 'x' number of milliseconds? Thanks.

Member Avatar for Nemoticchigga
0
54
Member Avatar for Nemoticchigga

I am doing a windows forms application in Visual Studio 2005. I have all the forms, as well as some additional classes in source files for data storage. I was wondering how to update data in one class based on another class. Does this need to be done through a …

Member Avatar for Duoas
0
104
Member Avatar for Maxil
Member Avatar for hacker9801
0
148
Member Avatar for Nemoticchigga

I am having an issue with the following code: [CODE]SerialPort^ com = gcnew SerialPort("COM1", 9600); array<unsigned char>^ messageBuf = gcnew array<unsigned char>(512); com->Open(); com->Read(messageBuf, 0, 512); com->Close(); [/CODE] messageBuf is not being filled with anything. I know the port is open cause writing works fine. Any ideas why this is?

Member Avatar for tesuji
0
99
Member Avatar for Nemoticchigga

I am trying to read from a serial port using System::IO:: Ports in visual studio 2005. I can write fine, but reading isnt reading in anything to the buffer. I am using the following code, similar to the way i was writing to the port. [CODE]array<unsigned char>^ messageBuf = gcnew …

0
51
Member Avatar for Nemoticchigga

I have a visual studio 2005 forms application that is giving me fits. I want to open a serial port in 1 form, set it to a com port in a class, then use it from that class. The problem is it gives my a null reference exception. [CODE]String^ comPort …

Member Avatar for Nemoticchigga
0
77
Member Avatar for Nemoticchigga

I have a visual studio 2005 form application. I also have created a header and source file with gets and sets and private variables for some of the data. How do I pass this data between forms? Ive looked at delegates but am having trouble understanding, is there another way, …

Member Avatar for Radical Edward
0
71
Member Avatar for Nemoticchigga

Does anyone know how to convert a "String^" data type in a visual studio 2005 forms app to an "int"? Ive tried atoi and casting to no success. Any ideas? Thanks.

Member Avatar for Nemoticchigga
0
100
Member Avatar for computer engW

Q1: [CODE]#include<iostream> using namespace std; int main(){ int value,check=1; cout<<"Enter a number: "; cin>>value; while(value>=0) { int newvalue; cout<<"Enter another value: "; cin>>newvalue; if(value>newvalue) { cout<<" ....Not sequence"; value=-1; } else { value=nwvalue; if(check==1) cout<<"....is increasing"; } } return 0; }[/CODE] you need to make sure your brackets are being …

Member Avatar for computer engW
0
105
Member Avatar for hacker9801

copy your packet struct into a char buffer on the send side then send the buffer: char buffer[512]; Packet packet; //populate packet struct memcpy(&buffer, (char*)&packet, sizeof(packet)); //send buffer Then just do the reverse on the receive side. Packet packet; //receive buffer memcpy(&packet, buffer, sizeof(buffer)); Is this what you were asking?

Member Avatar for hacker9801
0
111
Member Avatar for Nemoticchigga

I am receiving over ethernet into a 'char messageBuffer[512]' and then passing it on by a function call to 'process((char*) messageBuffer)' then in process: [CODE] void process(char* theMessage) { myStruct messageBuffer; memcpy(&myStruct, &theMessage, sizeof(theMessage)); //this line is wrong } [/CODE] Im not sure how to properly put it back into …

Member Avatar for Nemoticchigga
0
63
Member Avatar for Nemoticchigga

Does anyone know if rs-232 c++ code written with the windows.h library is easily changed to support rs-485 and rs-422 or if its not similar at all? Thanks.

Member Avatar for Nemoticchigga
0
67
Member Avatar for Nemoticchigga

Does anyone know how to get winsock2.h functions to work in a thread created by CreateThread(....)? All my code works outside a thread, but when I put it in the thread, it cannot bind the socket and read from etc. Thanks.

0
60
Member Avatar for Nemoticchigga

I am trying to create an ethernet socket inside a thread. The code works outside of the thread, but fails inside of it. Does anyone know what the problem is? Do I need to set up the socket outside of the thread? It compiles and runs, just fails to connect …

0
43
Member Avatar for Nemoticchigga

Does anybody know where I can get some basic source code on the creation and use of threads (I know about threads, just never coded them, and reading up on them, some of the inputs into CreateThread are confusing)?

Member Avatar for Nemoticchigga
0
106
Member Avatar for curt1203

I wrote a similiar program in college about baseball players and their stats. You are looking to broadly at the assignment and getting frustrated. Focus on just 1 function. All the functions are very similiar and once you get one, the others will fall into place. I know you want …

Member Avatar for big24fan
0
98
Member Avatar for Nemoticchigga
Member Avatar for Nemoticchigga
0
83

The End.