What kind of VB6 file generates a data report? - vb6

Please, I would like to know what kind of vb6 or vb file generates DataReport. For example vb calender is generated by MSCAL.OCX, vb dataGrid is generated by MSDATGRD.OCX, CommonDialog is generated by COMDLG32.OCX, ms data report designer v6.0 is generated by MSDBRPT.DLL

I'm not familiar with VB6 anymore but I think this may come from msdbrptr.dll.

Related

What visualizer is currently used

On the internet (Microsoft website, e.g.), there's plenty of information on how to create a visualizer.
However, I'd just like to know, which visualizer is currently used by my debugger?
For Native code, that question is very simple:
Menu "Tools", "Options", "Debugging", "Output window", "General Output Settings", "Natvis diagnostic messages", set to "Verbose".
In the Watch-window, enter .natvisreload
Verify the "output" window: all native visualisers are mentioned.
However, now I'm working with managed code, and in my watch-window, I see entries like:
{User Info: 12 User(s), 6 Group(s)
{VDX File Change Info (117 files)}
…
Those entries give me the impression that for this managed code, a/some visualiser(s) is/are used, and I'd like to customise, expand or modify it/them, but therefore I need to know where it/they is/are (sorry for the bad sentence, I just want to emphasize that I have no clue of the whereabouts of the visualiser(s)).
How can I know which managed visualizers are used in my Visual Studio session?
Thanks in advance
Dominique
You'd have to integrate with the debugger and see what types are being evaluated in the watch/autos/locals windows.
From there you can find those types in the list of modules loaded (using debugger apis) and then search for the attributes that Leo mentioned.
There's no debug output anywhere about which type visualizers are loading for managed code. It's actually stored on the types themselves.
How can I know which managed visualizers are used in my Visual Studio session?
According to the document Create custom views of managed objects:
In C# and Visual Basic, you can add expansions for custom data using DebuggerTypeProxyAttribute, DebuggerDisplayAttribute, and DebuggerBrowsableAttribute.
In .NET Framework 2.0 code, Visual Basic does not support the DebuggerBrowsable attribute. This limitation is removed in more recent versions of the .NET Framework.
DebuggerTypeProxy Attribute
DebuggerDisplay Attribute
Hope this helps.

Adding VBA reference in VB6.0

I have a old VB 6.0 application written by someone else. When i compile the application, it throws error on every line of code where VBA reference is required so fro e.g. it throws an error in the following lines:
Left$, Chr, Trim$
As soon as I prefix it with VBA.Left$, the error goes away. I was looking at the list of project References and saw only one missing reference called "Microsoft DTS run time 1.0". Where can I get this reference from and how can I add this in VB application. Also, is there any way, I can add VBA reference to VB application. I am running this VB application on XP machine.
any help will be appreciated.
Then you should install Microsoft DTS runtime:
How to: Install Support for Data Transformation Services Packages:
https://technet.microsoft.com/en-us/library/ms143755(v=sql.105).aspx
After, add the VBA reference (if is missing)
If you look at your list of Available References, you should see one for Visual Basic For Applications. Make sure this is checked and you will be good to go.
If there is more than one reference for VBA, select the one for msvbvm60.dll.

Excel Macro 1004 error on vlookup function from 2010 to 2007

I'm new here but excited to find the community. I'm new to macros, so forgive me if this seems rudimentary but I haven't been able to find an answer in any of the forums yet.
I recorded a macro in Excel 2010 using the following vlookup function:
ActiveCell.FormulaR1C1 = _
"=VLOOKUP([#[Campaign Id]],'BAM Raw Data'!C[-5]:C[-4],2,0)"
I'm new to the code side, so I don't quite understand how or why this works as the original vlookup was =VLOOKUP([#[Campaign Id]],'BAM Raw Data'!F:G,2,0), but regardless in 2010 the macro works beautifully.
I sent this macro to my team who are all running Excel 2007 and so far it seems that I continue to get a runtime error 1004 when I run it. When I go to debug the error, it points me to this vlookup function.
Is there a particular way to code a vlookup in VBA in 2007 vs. 2010 that I'm overlooking?
Excel 2007 structured reference syntax is different from Excel 2010 structured reference syntax. The # sign is not interpreted in 2007.
Change the formula to use normal references, which will work in both versions of Excel.

How to Decompile FMX file

I would like to know how to decompile a fmx file in order to make some changes into an application without source code, we just have the .fmx (Oracle 9i) file and really need the source code.
Actually there's no tool for decompile an FMX. You have to contact Oracle and ask them to do that, they will send you the fmb.
There are no tools to decompile an FMX. A previous question mentions the reason(!) for the lack of a decompiler.
Looking around other sites you'll get the same response - there is no fmx decompiler

Visual Studio Language Service with C# intellisense

Last year I wrote a Language Service for Visual Studio which added syntax highlighting for NHaml files: http://github.com/snappycode/hamleditor.
To clarify, NHaml is a html template language that can mix in code elements like an aspx file can. This plugin adds support to the IDE for editing NHaml files, but basically only adds syntax highlighting.
I was wondering if anyone knows how to add inline c# intellisense to the service like you get now in an aspx file. I'm hoping that would be possible without doing the whole c# grammar myself specific for the plugin.
Has anyone written a language service that mixes languages?
UPDATE:
It looks like the spark view engine guys have made some inroads here, I am investigating their implementation
I checked the Spark View Engine, and they seem to have made a generic ATL stuff (called SparkLanguagePackageLib), that in fact seems to be not containiag anything Spark specific. It seems to be just a generic C# intellisense library that needs the following:
The original code
The C# source that gets generated from the original code
The position mappings between the two (for example the code on line 2 pos 5 gets mapped in the output to line 4 pos 10, etc.)
Some other things, like Paintings(?)
And after that you can call:
events.OnGenerated(
primaryText, // original source code
entry.SourceCode, // generated sourcecode
cMappings, // mappings between the two
ref mappings[0], // ?
cPaints, // ?
ref paints[0]); // ?
I've tried to find Spark-specific stuff in that C++ library, but I couldn't find anything: everythig spark-related is split to a separate C# code file. I think this is good, because:
You don't need to edit the C++ files
If the spark view engine's intellisense support is installed it can be used by other view engines too
You only need to create a class, that maps between the original nhaml file and it's generated C# counterpart.
Btw. Are you still working on this NHaml Intellisense library? If not I'll try to patch their implementation in hope it can be converted to NHaml easily.
this looks like it might help
http://www.codeproject.com/KB/recipes/VSLanguageService.aspx
I finally managed to modify the code to support NHaml. It wasn't that hard at all. Unfortunately the original NHaml library doesn't support everything that was needed, so I had to create a new parser for NHaml. It doesn't support all of the constructs, but it supports most of them (enough to make NHaml programming easier)
Download: http://github.com/sztupy/nhamlsense
Screencast: http://www.youtube.com/watch?v=8jTZ2zC9eYc
You can easily add keywords by creating or modifying a usertype.dat file. Check here for some directions on attaching to specific file extentions. That might get you at least part of the way, without redoing the complete c# syntax.
(In fact, I'm not sure what you mean exactly by 'syntax highlighting' in this context. I'm sure, for instance, you get brace-match highlighting for free in the editor).

Resources