HRESULT STDMETHODCALLTYPE CProjectItemInfo::get_DefaultFileName(BSTR * Value) { _ASSERT( Value != NULL ); CComBSTR def_name(cDefaultName); return def_name.CopyTo(Value); }
static int vobjdump(void) { p = vobj; if (vlen>4 && p[0]==0x56 && p[1]==0x4f && p[2]==0x42 && p[3]==0x4a) { int endian,nsecs,nsyms,i; const char *cpu_name; struct vobj_symbol *vsymbols = NULL; struct vobj_section *vsect = NULL; p += 4; /* skip ID */ endian = (int)*p++; /* endianess */ if (endian<1 || endian>2) { fprintf(stderr,"Wrong endianess: %d\n",endian); return 1; } bpb = (int)read_number(0); /* bits per byte */ if (bpb != 8) { fprintf(stderr,"%d bits per byte not supported!\n",bpb); return 1; } bpt = (int)read_number(0); /* bytes per taddr */ if (bpt > sizeof(taddr)) { fprintf(stderr,"%d bytes per taddr not supported!\n",bpt); return 1; } bptmask = makemask(bpt*bpb); cpu_name = p; skip_string(); /* skip cpu-string */ nsecs = (int)read_number(0); /* number of sections */ nsyms = (int)read_number(0); /* number of symbols */ /* print header */ print_sep(); printf("VOBJ %s (%s endian), %d bits per byte, %d bytes per word.\n" "%d symbol%s.\n%d section%s.\n", cpu_name,endian_name[endian-1],bpb,bpt, nsyms,nsyms==1?emptystr:sstr,nsecs,nsecs==1?emptystr:sstr); /* read symbols */ if (nsyms) { if (vsymbols = malloc(nsyms * sizeof(struct vobj_symbol))) { for (i=0; i<nsyms; i++) read_symbol(&vsymbols[i]); } else { fprintf(stderr,"Cannot allocate %ld bytes for symbols!\n", (long)(nsyms * sizeof(struct vobj_symbol))); return 1; } } /* read and print sections */ if (vsect = malloc(nsecs * sizeof(struct vobj_section))) { for (i=0; i<nsecs; i++) read_section(&vsect[i],vsymbols,nsyms); } else { fprintf(stderr,"Cannot allocate %ld bytes for sections!\n", (long)(nsecs * sizeof(struct vobj_section))); return 1; } /* print symbols */ for (i=0; i<nsyms; i++) { struct vobj_symbol *vs = &vsymbols[i]; if (i == 0) { printf("\n"); print_sep(); printf("SYMBOL TABLE\n" "file offs bind size type def value name\n"); } if (!strncmp(vs->name," *current pc",12)) continue; printf("%08llx: %-4s %08x %-4s %8.8s %8llx %s\n", BPTMASK(vs->offs),bind_name(vs->flags),(unsigned)vs->size, type_name[TYPE(vs)],def_name(vs,vsect,nsecs), BPTMASK(vs->val),vs->name); } } else { fprintf(stderr,"Not a VOBJ file!\n"); return 1; } return 0; }