|
Do not post to multiple forum
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
What database are you using. If your database generate the problem on saving the file path. You can Encrypt the path and Then save to it.
If you can think then I Can.
|
|
|
|
|
im using an ACCESS DB, what do you mean by encrypting the path
|
|
|
|
|
If you are using Access DB then replace the \ to \\ and save it.
the second method is to save in database is encrypt the path.
If you can think then I Can.
|
|
|
|
|
thanks for your answer, please tell me what do you mean by encrypting the path, you mean to encrypt the path string before inserting to the DB, how would i do that ?
|
|
|
|
|
If your Path Name have a Special Character that database is not support. Then you can use to convert this path to a another string by using diffrent encryption method.
If you can think then I Can.
|
|
|
|
|
i need you to tell me HOW to encrypt it
|
|
|
|
|
|
My c++ dll takes as input char*.
.
bool testdata(char* data, int dataLen)
From Vb I am doing the following
Declare Function testdata Lib "\abcDLL.dll" (ByRef data As Byte(), ByVal dataLen As Integer) As Boolean
Structure Test
Public header As UInt32
Public lst As UInt32
End Structure
'
Private Function StructToByte(ByVal Struct As Object) As Byte()
Dim iStructSize As Integer = Marshal.SizeOf(Struct)
'Dim iStructSize As Integer = Len(Struct)
Dim buffer As IntPtr = Marshal.AllocHGlobal(iStructSize)
Marshal.StructureToPtr(Struct, buffer, False)
Dim btData(iStructSize - 1) As Byte
Marshal.Copy(buffer, btData, 0, iStructSize)
Marshal.FreeHGlobal(buffer)
Return btData
End Function
While calling the above function
Dim tFrom As Test
tFrom.header = 200
tFrom.lst = 200
Dim ByteArray2() As Byte
ByteArray2 = StructToByte(tFrom)
testdata (ByteArray2, 8)
PROBLEM:
The problem is that when in the dll I type cast the ata into a struc containing only 2 integer, I get incorrect values.
I am strugglign with this for the last 2 days, can anyone plese help me out
|
|
|
|
|
This may be unsafe, but you can directly pass a VB String to C++ dll that take const char * & or something like that depending on whether you pass by value or reference. For that matter you can pass VARIANT or _variant_t's as well using COM.
When you want to modify the string from VBA, then you need to use a bytearray. Otherwise, it is unnecessary.
|
|
|
|
|
You should post this question to the Visual Basic forum, as you are more likely to get an answer there.
txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
I have a class, call it Inventory, it does some basic database tasks using a BackgroundWorker like SaveChanges(), LoadFirstItem() etc. In my RunWorkerCompleted method PropertyChanged events are fired to notify the UI to update itself.
This works swimmingly in my WinForms app and the BackGroundWorker is clearly doing it's thing successfully, but I'm having trouble writing [TestMethod()] 's for the class in a test project. In a test project, it seems like after calling RunWorkerAsync the DoWork method doesn't get called, and as a result neither does RunWorkerCompleted, and my tests always fail.
Breakpoints in DoWork or RunWorkerCompleted are not hit. I assumed this was because my test method was not waiting for the background thread to finish so I've tried sleeping the main thread to see if the BackgroundWorker can catch up, I've tried the Application.DoEvents() thing, but I'm a bit of a rookie in the threading department... and the authoring of Unit Tests department for that matter! uh oh
Any pointers on how to please my BackgroundWorker in a [TestMethod()] ?
|
|
|
|
|
Hi Jack,
Not sure, but I would guess your test framework is being run from some thread other than the main thread.
BackgroundWorker (and other threads) are not allowed to touch GUI Controls directly, you know that. Some of their events (ReportProgress and RunWorkCompleted) take care of the thread barrier automatically, but only so when the BackgroundWorker got created by the main thread. Weird things could happen when an arbitrary thread creates a BGW whose event handlers in turn try to modify the GUI.
To make sure whether your DoWork method gets called or not, I suggest you simply insert a MessageBox.Show(), that one doesn't care about thread boundaries at all. An alternative diagnostic tool is:
Console.WriteLine("Method XYZ running on thread "+Thread.CurrentThread.ManagedThreadId.ToString("X2"));
which allows you to visualize the thread on which the caller is running.
|
|
|
|
|
First of all, sorry for the tardy reply.
With your suggestion I was able to confirm DoWork was running, the Test Framework was on thread 12, DoWork was on 14.
Now I'm wondering, if the BackGroundWorker only knows how to notify the "main" thread, and the Test Framework is not on the main thread, doesn't that mean I'm sort of stuck with testing this BackGroundWorker business?
Since I know the DoWork methods are running I suppose I could run a separate set of tests to confirm their results, but ick
Or, maybe I could ditch the BackGroundWorker and code the necessary threading behaviour myself? Do you think I could work around my issue in this way?
|
|
|
|
|
There is no need to ditch the BackgroundWorker at all; when a BGW is created by the main thread, one of its major advantages is its ReportProgress and RunWorkCompleted events run on the main thread too; when created elsewhere, you loose that advantage, but that is what regular threads do all the time.
So you would have to explicitly call Control.InvokeRequired and Control.Invoke to get the results towards your GUI, as if your BGW where just another thread. See e.g. here[^] for details, in case you need a refresh.
There might be an alternative, fiddling with SynchronizationContexts, but I'm not familiar with that.
|
|
|
|
|
Hy, im adding Audittrail to a project, that uses .nettiers. I know, that its possible to implement audittrail with the EF.
But is it possible to do this, when you didnt use the EF for your O/R-Mapping?
Thanks a lot for answers!
andreas
|
|
|
|
|
Hi
I am looking to read my Program's process memory. So I dump with taskmanager in *.dmp and but I don't know how to read in my own Visual C# .net program.
My task is to search into memory of program to find the strings
So i am looking open dump file similiar to "WinHex" program and then search into strings.
Regards
Simran
|
|
|
|
|
Pick one forum and stick with it. Posting to multiple forums will just get you ignored
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
(sorry for my english )
I currently work on a code editor with syntaxtic coloring in VB.Net. As much examples found on the Net, I left on the solution "selection the key words found and coloring selection".
As i know it's hard to make something clean and fast (I'm a beginner), I Override "onTextChanged" with a boolean flag "CanPaint", and override "WndProc" for checking if it's "Paint message" for redraw my richTextBox only when it is necessary.
For speeding, I check for keyword only on the current line.
All works fine, except when a keyword is separate on several lines. AS I want coloring XML and HTML tags, the system must also function on several lines, and it is there that I do not know how to consider the problem.
I can easilly chek for keywords on all lines of the richTextBox, but if there's 500 or 1000 lines ... VB is likely to pain I think.
I thought of carrying out in background task all X seconds a “srcipt inspector” on all the text while keeping my coloring by lines… but I know nothing with the thread yet there.
I do not see how to consider the problem. I am taking of all councils Thanks
|
|
|
|
|
Hi,
I've done a couple of syntax colorizers, most of them without using a RichTextBox at all.
RTB is rather slow, as it performs complex parsing and formatting jobs, and requires all text to be concatenated.
Here is what I typically do:
- implement the colorizer logic on my own data structures, tailored for that purpose;
- store each line in a separate object, all of them in a list;
- a line would consist of the text itself, plus some extra information, e.g. "this line opens a multi-line comment", "this line closes a multi-line comment", etc.
- scan the document from start till current view point to determine state (e.g. am I in the middle of a
multi-line comment)
- only execute the actual coloring logic on visible lines (that is a few dozen, whatever the size of the current document is)
- and when the output were an RTB, I would probably generate the RTF string myself, rather than doing lots of selections and modifications.
|
|
|
|
|
GIDS is India's Biggest Polyglot Conference for Software Developer Professionals
Bangalore, March 25, 2010: Every year, Great Indian Developer Summit is a game changer for several thousands of IT professionals, providing them with a competitive edge over their peers, enlightening them with bleeding-edge information most useful in their daily jobs, helping them network with world-class experts and visionaries, and providing them with a much needed thrust in their careers. At GIDS 2010, to be held 20-23 April in Bangalore, Vice Presidents of Goldman Sachs' technology division speaks about acceptance test driven development and collections renaissance.
Acceptance test driven development can work really well. Users give their requirements as inputs and a table of results, and you can show them directly that they are done. John Tobin and Mohammed Mohsinali of Goldman Sachs say FitNesse, an open-source framework from ObjectMentor, is a great tool for this. Users can put their expected results in a wiki, press the page test button and see results. At GIDS, on the 22nd of April, John and Mohammed will conduct an example-driven session on FitNesse and how it can be used in large, business-critical applications.
In another session, Vlad Zakharov and Donald Raab will dwell on Java collection frameworks, why is there a sudden emergence of frameworks and what should you look for in a collections framework. They will explain the historical perspective – from the pre-Java days through the dark ages of early Java to today's collections renaissance. How the "minimal interface" philosophy of the Java API has lead to some unfortunate decisions. Why modern languages all have closures, and how the "humane interface" is fighting back. You will see examples of the power and simplicity you can bring to your code, and find out how to design collections classes. After this session, you will never look at a for loop in the same way again.
With several decades of software development experience between them, the speakers are a powerhouse of knowledge on software development and the ICT industry. John Tobin has extensive Java enterprise development experience with companies ranging from start-ups through product companies to large global corporations. A Vice President at Goldman Sachs Technology Division, he is particularly interested in reducing development time and production issues by building the partnership with users. Mohammed has several years of experience in developing enterprise oriented software. Mohammed is a VP at Goldman Sachs Technology Division and is focused on developing framework components to enable users to complete their tasks in an efficient and effective manner.
Vlad Zakharov, a VP at Goldman Sachs' Technology Division, has programmed in Java, Smalltalk and a number of other more obscure languages. His areas of expertise include application architecture, object-oriented analysis and design, and software development. Donald Raab has 20 years of experience in technology and software development and is a VP at Goldman Sachs' Technology Division. He has programmed in Java, Visual Basic, Smalltalk, and a number of other more obscure languages. His areas of expertise include application architecture, object-oriented analysis and design, Test Driven Development, and collections framework design and implementation.
From 20th to 23rd April 2010, immerse yourself in over 80 sessions from the world of Rich Web, Java and Microsoft computing technologies at India's biggest polyglot conference for Software developers. Attend Great Indian Developer Summit to gain the information, education and solutions you seek. From post-conference workshops, breakout sessions by expert instructors, keynotes by industry heavyweights, enhanced networking opportunities, and more.
About Great Indian Developer Summit
Great Indian Developer Summit is the gold standard for India's software developer ecosystem for gaining exposure to and evaluating new projects, tools, services, platforms, languages, software and standards. Packed with premium knowledge, action plans and advise from been-there-done-it veterans, creators, and visionaries, the 2010 edition of Great Indian Developer Summit features focused sessions, case studies, workshops and power panels that will transform you into a force to reckon with. Featuring 3 co-located conferences: GIDS.NET, GIDS.Web, GIDS.Java and an exclusive day of in-depth tutorials - GIDS.Workshops, from 20 April to 24 April at the IISc campus in Bangalore.
At GIDS you'll participate in hundreds of sessions encompassing the full range of Microsoft computing, Java, Agile, RIA, Rich Web, open source/standards, languages, frameworks and platforms, practical tutorials that deep dive into technical skill and best practices, inspirational keynote presentations, an Expo Hall featuring dozens of the latest projects and products activities, engaging networking events, and the interact with the best and brightest of speakers from around the world.
For further information on GIDS 2010, please visit the summit on the web http://www.developersummit.com/
A Saltmarch Media Press Release
E: info@saltmarch.com
Ph: +91 80 4005 1000
|
|
|
|
|
|
Create a new Win32 project and select static lib or dll in the project type page. VS2005 will set the build options automatically to build the selected library type.
txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
thanks but but how to link the libraries which i want with the win32 pjt newly created?
|
|
|
|
|
sindhumahe wrote: thanks but but how to link the libraries which i want with the win32 pjt newly created?
Just add the library to your Linker options in the project properties. Obviously time to go through either the VS help files or the entire properties lists to get familiar with some of the basics.
[edit]Note: please do not remove your original question, as nobody can see what the answers refer to. Remember your question may help someone else in the future.[/edit]
txtspeak is the realm of 9 year old children, not developers. Christian Graus
modified on Thursday, March 25, 2010 8:22 AM
|
|
|
|
|