I have been looking for a method to prevent the debugger from stepping into functions/class methods that I do not wish it to enter. This was available in VC 6 - is it availble with VS.Net 2003? Thanks Dave Dak Lozar Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible. - MSDN:C# Programmer's Reference
Dave Loeser
Posts
-
VC.Net Debugging -
Closing document in Word under AutomationI'm using Word Automation (using C++ here) as an out of proc exe to Find and Replace text within documents. When I create an instance of Word I would prefer to keep that instance open and then open, search/replace, close and repeat until I am finished with all documents and then quit the word application instance. I have this working but I have an odd (or maybe it is a common) problem. When I close the document, Word becomes visible. Here's how I am closeing the document.
void CMSWord9Automation::CloseDoc() { try { if(m_pOpenDoc) // Word::_DocumentPtr { //m_pWord->Visible = VARIANT_FALSE; // Does not work m_pWord->Documents->Close( &_variant_t(Word::wdDoNotSaveChanges), &_variant_t(vtMissing), &_variant_t(VARIANT_FALSE)); //m_pWord->Visible = VARIANT_FALSE; // This resets word to invisible but isn't really the desired approach m_pOpenDoc.Release(); } } catch(_com_error& ComError) { DumpComError(ComError); } }
I'm looking for any information on how to stop Word from displaying when I close the opened document. Thanks, Dave Dak Lozar Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible. - MSDN:C# Programmer's Reference
-
Indianapolis, Here I Come!I don't think the martial arts would provide you with much of a chance - everyone in Gary carries a gun. Of course, if you can dodge bullets you're good :) I live in Indiana, but I'm down south, 9 miles from Louisville, KY which is where I work... I can't help much with Indy... The biggest problem with Indiana and Indianapolis is that the dumbass govenor has chased businesses out of the state... in fact, I think 80% of all new business brought to Indiana by the previous administration are no longer in the state... that's sad. Dave Dak Lozar Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible. - MSDN:C# Programmer's Reference
-
DOS Nostalgia - an old timer's reflectionsSteve Hazel wrote: Kinda sucks to have 12 years of Oracle and C++ experience when you need your resume to say SqlServer and C#... Man, I hear what you're saying... of course, one of the issues that we programmers are faced with is keeping up witht the technology. I'm usually one cycle behind the current trend... especially after being one of those early Java adopters... I've not touched Java since '98. I have had some training in .NET and will probably continue to use/learn it... but I do miss those old 8bit days.... C=64. Now that I think about it I miss the old 16/32bit days of the Amiga :) Oh well. Dave "Dak Lozar" Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible. - MSDN:C# Programmer's Reference
-
What's your opinion about H-1B visa in the current economy?Thomas George wrote: Why would anyone want to come and work in US for 30k a year? especially, if there is a family to support. Thomas, I really do not know the reasons why anyone would do such a thing... but... it would seem that you have answered your own question Thomas George wrote: but, fair price is what the market offers. The third world offers people at much lower costs, and essentially becomes the fair price. If there is any mechanism to artifically decide this fair price, it is socialism, not capitalism Dave "Dak Lozar" Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible. - MSDN:C# Programmer's Reference
-
What's your opinion about H-1B visa in the current economy?OK, I'll bite on this... Professionally, I have a problem with the way that company's treat/utilize H1B's. Specifically as cheap labor. I have witnessed two previous companies paying these folks the bare minimum in favor of hiring U.S. Citizens on more than one occasion. My understanding of the purpose of the H1B is “to pay foreign nationals the "prevailing wage" for the position; foreign workers must be paid at least 95% of the "prevailing wage" for the particular occupation and geographic region.” From what I’ve seen previously, there are instances where a new college grad was being paid 30k and an H1B working along side with several years of experience being paid 95% of 30k. This is not a good situation for employees (H1B or citizens) but a great situation for the companies. There in lies the problem; if a company can maintain a staff of fresh out of college programmers, keeping wages low and augmenting that staff with skilled H1B’s the overall wages for my chosen profession could be stagnant or worse, significantly reduced. Maybe I’m over generalizing this but I know the way many companies “think.” Personally, I do not have an issue with the H1B's. In fact, at my last place of employment I had a chance to work with several Indians, Pai (contact me if your reading this), became a very good friend and on our weekly Wednesday night "group" dinners, he became a regular. One of the saddest days was the last time I saw his smiling face at my going away dinner… I lived overseas for 10 years and still enjoy traveling… I enjoy meeting folks with different cultures. So far, in my career I have had the pleasure of meeting people from Russia, Romania, Ukraine, India and Britain… fun stuff :) Dave "Dak Lozar" Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible. - MSDN:C# Programmer's Reference
-
Man what a game!!:) As a long time Steelers fan... I am very happy with the result of the game... But, I fear the Titans... Dave "Dak Lozar" Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible. - MSDN:C# Programmer's Reference
-
AppendChunkHi all, I've been working on a conversion app, that is a one off application... basically reading data from one table and inserting it into a new table. I'm using AppendChunk to insert the new record into the destination table... now on to the problem. When I append the data to the field it seems that this is being done asynchronously and when I try to free the memory I’m getting an exception that says the memory is locked. Here's the snippet of code: This code is inside a try/catch block
... //Assign the Safe array to a variant. _variant_t varChunk; varChunk.vt = VT_ARRAY|VT_UI1; varChunk.parray = ChunkBlock; //SafeArrayLock(varChunk.parray); pRs->Fields->Item["Data"]->AppendChunk(varChunk); //SafeArrayUnlock(varChunk.parray); hr = pRs->Update(); pRs->Close(); SafeArrayDestroy(varChunk.parray); ...
My questions are; is AppendChunk an asynchronous operation? And if so, is there a way to force it to be synchronous? Thanks for any help or pointers... Dave "Dak Lozar" Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible. - MSDN:C# Programmer's Reference -
it's new year's eve now...I read something on a usenet newsgroup the other day and I share it here, the gentleman wrote "International politics resembles 7-year-old playground politics." Dave "Dak Lozar" Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible. - MSDN:C# Programmer's Reference
-
Lauren's PicWow... where _are_ all the good looking and nice women in IT :) Dave "Dak Lozar" Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible. - MSDN:C# Programmer's Reference
-
And war is deferred, a bit longerbenjymous wrote: Saddam Dubbuyuh Hussain? Not much makes me laugh now that Seinfeld has been off the air for like 10 years... but that made me laugh so loud the chap next to me thought I was going bonkers! Good one. Dave "Dak Lozar" Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible.
-
SAFEARRAY - MultidimensionsHey all, I'm working on a component that returns a SAFEARRAY. Here's the IDL for the method as well as the C++ declaration:
[id(2), helpstring("List of Report Type (Names) available to a user on a specific date")] HRESULT GetReportTypes([in] BSTR UserID, [in] INT CloseDate, [out, retval] VARIANT* pReportTypes);
STDMETHODIMP CReports::GetReportTypes(BSTR UserID, INT CloseDate, VARIANT *pReportTypes)
Now without loading this up with a ton of code I'll explain what I am doing and then show the important parts of the code. Basically, I want to return a SAFEARRAY that is mulitdimensionl, in this case the array is [x][1] in size and x is determined by the number of records retrieved. So here's how I'm creating the SAFEARRAY:// Setup/Create our SAFEARRAY SAFEARRAYBOUND SABounds[2]; SABounds[0].cElements = (DWORD)pRsHPASReports->RecordCount + 1; // Why do I need to add 1 to this??? SABounds[1].cElements = SABounds[0].cElements; SABounds[0].lLbound = 0; SABounds[1].lLbound = 0; // Initialize the variant and set it up as an array of variants VariantInit(pReportTypes); pReportTypes->vt = VT_VARIANT | VT_ARRAY; pReportTypes->parray = SafeArrayCreate(VT_VARIANT, 2, SABounds);
and then after opening the recordset I loop through the records filling in the SAFEARRAY with my data, like so:while(! pRsHPASReports->IsEOF) { ldimension[0] = lLoop++; ldimension[1] = 0; CComVariant bstrTmp( pRsHPASReports->Fields->Item["RptType"]->Value ); TESTHR(SafeArrayPutElement( pReportTypes->parray, ldimension, &bstrTmp )); ldimension[1] = 1; CComVariant bstrTmp2( pRsHPASReports->Fields->Item["Title"]->Value ); TESTHR(SafeArrayPutElement( pReportTypes->parray, ldimension, &bstrTmp2 )); pRsHPASReports->MoveNext(); }
pretty standard stuff, right? Well, as you can see from the comment above, If I have a record count of 1 then the SAFEARRAY does not appear to be initialized properly... I'm forced to add 1 to the count so that I can build the array. My question is why can't I create a SAFEARRAY with a size [1][1]? On the client side, when checking the bounds on the SAFEARRAY I see 0 to 1 ... yet the element at postion 1 is empty. I've looked high and low on the web for a soloution and have not been successful... So, anyone know how I can create a SAFEARRAY with just one element? Thanks, Dave "Dak Lozar" Loeser -
I blame you guys for thisI envy you... I have about 6 year before I can get my Vette... when my daughters have ummm left the house :) If they really ever do... Dave "Dak Lozar" Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible.
-
Its 12:15 - Do you know where your dongle is?I have a friend/colleague that placed
ID10T:
before all of his error messages :laugh: Maybe you should do the same? :-D Dave "Dak Lozar" Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible.
-
MSDN JOTDI thought this so funny I've included it in my sig... I've been looking for a good sigline and now I have it. Thanks! Dave "Dak Lozar" Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible.
-
State MachineWow - and it's not just a programming language any more... it's a philosophy! :rose: Dave "Dak Lozar" Loeser
-
State MachineI'm with you Jeremy, at 7-8 I was playing with Tonka trucks in a big dirt pile... I have to admit... I ate my share of dirt too :laugh: Dave "Dak Lozar" Loeser
-
So happy for you to be read!ROTFLOL - I had to call my co-workers over to show them what was so funny... you know, so they wouldn't think I was crazy or anything :) Dave "Dak Lozar" Loeser
-
For all Pakistanis and Indians!Nish, I like. I think this lesson applies to all people - regardless of race, religion or creed.
-
Shoe LacesBrian, what I find annoying is when you're tieing your shoes and one of your shoe laces breaks! ACK!!!! Dave "Dak Lozar" Loeser