Jump to content
  • Advertisement

TelevirtualSoftDev

Member
  • Content Count

    23
  • Joined

  • Last visited

Community Reputation

122 Neutral

About TelevirtualSoftDev

  • Rank
    Member
  1. TelevirtualSoftDev

    .lib file

    Sorry, It's actually my mistake. I meant to write 'without' (I do not have the source code for the DLL). My apologies. I'll revert to your previous awnser. Thank you both.
  2. TelevirtualSoftDev

    .lib file

    Sorry, where can I turn this option on?
  3. TelevirtualSoftDev

    .lib file

    Ok, thank you. I'm presuming from what i've just read that if i couldn't get a function within the DLL to work using LoadLibrary, using a lib file is extremely unlikely to make a difference, so I won't try. thanks again. Liam
  4. TelevirtualSoftDev

    .lib file

    Hello. I'm trying to use a DLL file and I have done so using LoadLibrary("***.dll") with GetProcAddress(). This has worked fine up until now but is causing me some problems. Ideally instead of using this method I would prefere to use a .lib file to allow me to intergrate it using visual studio .net. I don't have a .lib file though. Is there any way to create this .lib file with having the source code for the dll? Thanks in advance for any help you can give here.
  5. TelevirtualSoftDev

    Windows Service - file writing.

    Hi. I've solved this error. I declared the variable as fstream - this works when opening the program normally but not when as a service. Need to use ofstream/ifstream. Now it writes the file
  6. TelevirtualSoftDev

    Windows Service - file writing.

    Hi. I've got it running under local system account with desktop access active so that i can debug it. thanks for the reply
  7. I'm currently putting an application I have created into a windows service. I have a problem where ofstream does not appear to be working in my test service application. In this code example below, when I run from the services window, the FILE method writes to file but the ofstream does not although both work when run from VC++. Any help with this issue would be much apprecated. if(logging){ char* logNote = new char[1000]; TimeAndDate sysTime; sysTime.GetScreenTimeWithSeconds(logNote); strcat(logNote," - "); strcat(logNote,logInfo); strcat(logNote,"\n"); //findlogfilename char* logFileName = new char[500]; char* logDate = new char[500]; sysTime.GetDate(logDate); strcpy(logFileName,"RssServerLog"); strcat(logFileName,logDate); strcat(logFileName,".dat"); //open file where seek set at end,app - ignores any further seek command fstream logFile; logFile.open(logFileName, ios::app); logFile << logNote; logFile.close(); logFile.clear(); FILE* log; log = fopen("C:\\memstatus2.txt", "a+"); //if (log == NULL) //return -1; fprintf(log, "%s\n", logNote); fclose(log); }
  8. TelevirtualSoftDev

    DLL Memory leak

    I've been looking and i havn't found anything so far. I'm away until monday now but i'll post up anything i find out then. If you do think of anything else please let me know. Thanks again to everyone for all the help here it's much appriciated.
  9. TelevirtualSoftDev

    DLL Memory leak

    Hi. I've tried these methods but don't see to get an break until the same point. (Of course i may just be using them wrong). I have noticed one thing though. sizeof(TextToSpeech) - My DLL class returns 1. There is absolutely no way this is correct. TextToSpeech reads in a string of characters and writes out a spoken mp3 of that string using a TTS engine. Could it be that it is not allocating the memory properly in the first place and this is causing the trampling as the instance uses the memory it thinks it has been allocated but it has not?. thanks again for the input here.
  10. TelevirtualSoftDev

    DLL Memory leak

    Hi. I've done that with the import and export now, however, i still get the same result. Could you explain to me why you code sample would cause an error so i can see if i am doing the same. I notice you have a virtual disructor. Is this required (or is it that which causes the error). Thanks again.
  11. TelevirtualSoftDev

    DLL Memory leak

    Hi. Sorry, should have spotted that. I am now using the debug versions of the libraries in both projects. It doesn't matter wheter i declare an instance of the class (in dll) dynamically (tried both delete call ways) or just locally i.e. no new and delete. Everything works fine up until the point when the memory is cleared and then there is an exception error. If i declare dynamically and miss out the delete it works but leaves a 1 byte memory leak. If i include the code of the DLL rather then the DLL i get no memory leaks (not practical long term solution). If i do not include the DLL in the main project i also get no memory leaks. I think i have done everything you have mentioned. The one thing that i am unsure of is: Am i exporting the functions correctly? Header in the project that makes DLL: class TextToSpeech{ public: __declspec(dllexport)TextToSpeech(); //is dllexport appropriate here? __declspec(dllexport)~TextToSpeech(void);//i.e. on constr. __declspec(dllexport) int RunFullTTSComponent(wchar_t*, char*, char*); __declspec(dllexport) int RunFullTTSComponent(char*, char*, char*); __declspec(dllexport) int InitialiseTTSComponent(char*); __declspec(dllexport) int ComponentSpeakToFile(char*,wchar_t*, char*); __declspec(dllexport) int ComponentClear(); __declspec(dllexport) void Release(); private: int InitialiseFileNames(char*); int UninitialiseFileNames(); //text file name char *cTextFileAscii; bool bHasWavFileHeader; bool bIsRealSpeakEngine; TTSDriver *primarySpeechDriver; }; Header in the project DLL included in: class TextToSpeech{ public: TextToSpeech(); //do i neeed dllimport anywhere here? ~TextToSpeech(void); int RunFullTTSComponent(wchar_t*, char*, char*); int RunFullTTSComponent(char*, char*, char*); int InitialiseTTSComponent(char*); int ComponentSpeakToFile(char*,wchar_t*, char*); int ComponentClear(); void Release(); }; Sorry that this is prooving to be real trouble. Thank you very much for your help so far.
  12. TelevirtualSoftDev

    Games on Phones

    Thankyou for the relpy. There is one other thing related to something i'm thinking for coding. How prevelent is the J2ME 3d API and if it is not widely used now is it likely to be in the future? thanks again
  13. TelevirtualSoftDev

    DLL Memory leak

    Hi. Thanks for all the relies. If nothing else I’ve learned a little more about the process. As for the problem at hand: I use visual Studio and i have now matched the libraries on both projects to the multithreaded release version. I have tried deleting the memory the way I was doing it and through a this pointer in the DLL. I have so far had no luck. I still have a 1 byte memory leak (I use _CrtDumpMemoryLeaks() to gather that knowledge). Is there a different way of including the DLL i could possibly try? or does anyone have any other suggestions. Thankyou very much for your input so far.
  14. TelevirtualSoftDev

    Games on Phones

    Hi. I have developed a 2d game in flash and have moved it to a mobile(cellphone) using flash lite. The problem i have is that, although convinient, flash lite isn't very widely supported. Basically i have a few questions: Is flash Lite likely to become more supported in the future? In the mean time what should i program my games in - what are best options to make a game that can be easily used on multiple handsets. I have so far assumed this would be J2ME. Are there any good sites or referances I should check out to learn about developing flash games that can be used on as many different handsets as possible? thankyou
  15. TelevirtualSoftDev

    DLL Memory leak

    Hi. I have created my own DLL using C++. I am now trying to use it. I include the header file and everything within the class works fine...apart from.... I dynamically declare an instance of the class as I would normally. But the 'delete' causes an exception error. If I do not dynamically declare it I get an exception error when the instance goes out of scope. If I miss out the delete I get a memory leak of one byte. I suspect it may be something to do with the destructor but I do not know what. The last function in the call stack is _crtIsVaildHeapPointer(); Any ideas appreciated. Thank you
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!